mysqlcheck/mariadbcheck: consistency check before mysqldump
Dear mariadb experts, I would like to do this to verify my dbs (to detect hardware errors so that I can replay a backup timely): mysqlcheck -u root -pX --check --all-databases --extended Is it definitely read-only? Can I rely on the return code (0=success)? Or do I not need this because "mysqldump" does consistency checks? Many Thanks and Best Regards! Felix -- Felix Natter
Verifying integrity before making backups sounds like a side effect. You should probably monitor your logs (they’ll tell you when tables are corrupt) and/or have a SOP in place to run mysqlcheck after a crash. William Edwards
Op 20 apr 2024 om 15:44 heeft Felix Natter via discuss <discuss@lists.mariadb.org> het volgende geschreven:
Dear mariadb experts,
I would like to do this to verify my dbs (to detect hardware errors so that I can replay a backup timely):
mysqlcheck -u root -pX --check --all-databases --extended
Is it definitely read-only? Can I rely on the return code (0=success)?
Or do I not need this because "mysqldump" does consistency checks?
Many Thanks and Best Regards! Felix -- Felix Natter
_______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-leave@lists.mariadb.org
hello William, thank you for the quick reply. William Edwards <wedwards@cyberfusion.nl> writes:
Verifying integrity before making backups sounds like a side effect.
You should probably monitor your logs (they’ll tell you when tables are corrupt) and/or have a SOP in place to run mysqlcheck after a crash.
@William: What do I have to grep for (I guess in /var/log/syslog [1]?)? The idea is to restore yesterday's backup when today's db is corrupted (which is waay better than detecting it a week later!).
mysqlcheck -u root -pX --check --all-databases --extended
Is it definitely read-only? Can I rely on the return code (0=success)? -> could someone answer this?
Many Thanks and Best Regards, Felix [1] On Ubuntu 20.04/22.04
William Edwards
Op 20 apr 2024 om 15:44 heeft Felix Natter via discuss <discuss@lists.mariadb.org> het volgende geschreven:
Dear mariadb experts,
I would like to do this to verify my dbs (to detect hardware errors so that I can replay a backup timely):
mysqlcheck -u root -pX --check --all-databases --extended
Is it definitely read-only? Can I rely on the return code (0=success)?
Or do I not need this because "mysqldump" does consistency checks?
Many Thanks and Best Regards! Felix -- Felix Natter
_______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-leave@lists.mariadb.org
-- Felix Natter debian/rules!
participants (2)
-
Felix Natter
-
William Edwards