This is an old revision of the document!
Merkalt.no DB backup
There is a necessity to make regular backup of DB tables for Merkalt site instances.
Usually DB backup is performed as cron job. On merkalt host cron job is not supported. So we could resolve this problem with a help of so-called “pseudo-cron” script. The idea consists in launching of pseudo-cron script from usual site page. I think, it could be sendmail.php. Visiting of this page by site users will start pseudo-cron script.
First of all, backup script should work periodically but not every time when users visit this page. For this purpose additional DB table should be used. This table will contain following information:
- launching script name - the full path to backup script to be launched as pseudo-cron job;
- backup period - time (in days or hours) between sequential backups;
- last backup date - the date and time of last successful backup.
On the basis of this data pseudo-cron script should make decision if next DB backup should already be made or not. If current date and time is greater then last backup date plus backup period then backup script should be launched. Otherwise - shouldn't.
Backup files should be gzipped, stored ouside of sites accessible area. If size of gzipped backup file will not too big then backup should be sent via e-mail as attached file. But file size issue should be explored first. Third party script for DB backups could be found in merkalt.com/test/_db_backup folder. It seems it has all these features.
Backup file should not include tables of test instances if it possible (tables with 'tst_' prefixes).
Questions:
- Should this backup include tables of wordpress (customer service) blogs also?
- Labelyourbelongings.com instance hosted separately ftom other merkalt instances. Should this script be installed for Labelyourbelongings.com?
