Linode Backup & MySQL db?
I purchased the linode backup service to ease my brain.
But then I was told by a friend to dump mysql db to file before the linode backup window period. This make me worry.
So here is my questions:
1) Why do i need to backup my db? is it because linode backup could screw up my db?
2) Does the linode backup backup all my db data too?
5 Replies
2) Yes, but as per 1. it maybe inconsistent.
So if you know your database takes 10 minutes to dump, and you have a backup that runs at 5am, dump your database at say 4:40am which gives you 10 minutes safety margin. That way if your database is corrupted in a backup you'll have lost at most 20 minutes data.
other than inconsistency.
could the backup actually corrupt my database if I were doing query while the linode backup doing his work?
Most databases have some form of recovery mechanism if you use mysql with the default myisam, those don't recover too well since they're not crash safe.
Just schedule a dump before your backup, and if you have to restore, restore the backup then restore your DB from the dump. It's good practice for any MySQL backup scenario.
Chris highlighted some of the things that can go wrong
most of the tables in a database were fine but some were corrupted.
if the table is in use then it will not backup, unless you do a mysqldump