Check Your Database Backups

Check Your Database Backups

I thought I would take the time to help out fellow DA users, as I’ve spent half a day working out what was wrong and fixing it.

Thanks to the following update:

http://www.directadmin.com/features.php?id=1323

The following database-only backup command will no longer work (this was the standard command, as produced by the control panel, before the changes were introduced):

Code:

echo "action=backup&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&option%30=database&owner=admin&select%30={$USER}&type=admin&value=multiple&what=select&when=now&where=local" >> /usr/local/directadmin/data/task.queue


Well, it will work but you won’t get the .SQL database file, just the configuration settings. To produce a database backup, you need use the following with changes in bold and underlined:

Code:

echo "action=backup&database%5Fdata%5Faware=yes&local%5Fpath=%2Fhome%2Fadmin%2Fadmin%5Fbackups&option%30=database&option%31=database%5Fdata&owner=admin&select%30={$USER}&type=admin&value=multiple&what=select&when=now&where=local" >> /usr/local/directadmin/data/task.queue


Anyone who has the old command set up as a cron job or in their own custom backup script will need to amend it, otherwise they will find themselves in the situation we had this morning – needing to restore a database with no backup.

This update should have been circulated by email, and DA users should have been notified in advance, as it breaks existing functionality. I am sure we’re not alone.

Comments are closed.