3 ms·
Verifying backups is almost always many times more difficult than setting up the backups themselves. Checking that replication was in fact working turned out t
by Locke 18y ago
Verifying backups is almost always many times more difficult than setting up the backups themselves. Checking that replication was in fact working turned out to be fairly easy to automate (although, short of checksumming all the records in all the tables you can't really be 100% sure everything is okay).
That's the thing with backups, they can fail or become corrupt in many ways. If you don't use them for something on a regular basis or have some regular verification process you may not know what you have until it's too late.
And, of course, I've also seen situations where subtle data corruption in the master database leads to weeks of subtly corrupt backups. By the time the corruption was discovered we faced the choice of rolling back several weeks to the last good backup or fixing the corruption. In the end we had to do a kind of merge -- it was a real pain.
- bemmu 18y agoIf I just have one MySQL machine and take daily database dumps, what would be good way of testing that my backups are OK?
- Locke 18y agoThe best situation for me has been one of my personal projects. It's a gaming site that I use everyday. The database dump is less that 100MB gzipped, so I load it in my development environment every week or so. That way as I develop I'm verifying (to some extent) the quality of the backup. As a baseline, you should at least restore from your backups occasionally. It helps that I'm familiar with the data -- so after restoring the backup I expect to see games, messages, forum posts, etc that I've just seen in production. I do some more thorough automated tests on the backups less frequently. App specific things, like replay games and verify results, etc. This process is more about assuring backward compatibility with the code though. I think verification should ultimately be somewhat app specific. That said, I'm sure you can find tools to help with verification.
- a-priori 18y agoPerhaps creating a virtual machine (Xen, VMWare, whatever) on your development box and using that to test restoring your backups?