Recently, I recounted my experience installing and running my qdb.pl script on OpenBSD 3.7. Though the backup runs worked fine from the console, they failed strangely when run from crontab. I encountered the following error message from ender:
I’ve been diligently backing up bonzo using qdb.pl, my homegrown backup script. bonzo is a very important machine, as he stores my entire digital image archive, my Subversion repository, MySql databases containing Drupal and Gallery2 data, and 24-hour evaluation copies of large software packages. However, I realized somewhat belatedly that my MySql databases were not being backed up as part of my backup regime.
I’ve decided on a two-layer backup approach to backing up MySql:
/var/db/mysql. Since I only use MyISAM and not the more advanced MySql storage options, this will be sufficient most of the time. However, in the off chance that a backup runs in the middle of a MySql transaction, the ISAM files may be in an inconsistent state. Which leads me to the second layer…