View Full Version : Incremental Restores

April 24th, 2008, 09:08 AM
I just recently implemented mysql-zrm on my database server. I would like to try a restore just to make sure I know the process if something goes wrong and I actually need to restore. At present I'm doing full backups on Friday evenings and incrementals on Monday-Thursday evenings.

If I have to do a restore on Friday morning, do I first have to restore last Friday evening's full backup and then Monday's incremental, Tuesday's incremental, and so on through Thursday's incremental, or can I just restore from Thursday?

I'm thinking about changing my incremental schedule to once per hour. If the restore process is this tedious for my current daily schedule, the hourly schedule probably won't work out too well.

Thanks in advance for any information you can provide.

April 28th, 2008, 07:34 AM
Ok, surely people are doing restores here. What good is a backup without knowing the proper restore method? I would appreciate a response. Thanks!

April 28th, 2008, 09:43 AM
The answer to your question is that yes, you must restore the last full backup and then all of the incrementals in order. You can, however, use the --bin-logs option to specify the binary logs all in one chunk. As an example:

First you would restore the full backup:

mysql-zrm-restore --source-directory 'full backup directory' ...any other options

Then you could restore multiple incremental backups:

mysql-zrm-restore --bin-logs 'backupdir/binlog.001 backupdir/binlog.002 ... backupdir/binlog.050'

This would allow you to combine the binlogs.

One of the benefits of the ZRM Enterprise edition is that it handles putting together full and incremental backups for you so you can just enter the date and time to when you want to restore to and it will choose the appropriate full backup and incremental backups for you to do the restore. You can also restore to specific events within the incremental backups so you don't even have to restore the complete incremental backup if you don't want to.