View Full Version : Howto daily backup with incremental backup every X hours

April 10th, 2008, 03:55 AM
Hi !

I tried to setup a backup of mysql with zamanda 2.0 (lvm snapshot methode) and wanted to ask how to setup something like a daily backup (which I already have) and a incremental backup every X hours (f.e. every 2 hours)



April 10th, 2008, 11:12 AM
Please see examples in the bottom of the section (http://mysqlbackup.zmanda.com/index.php/Daily/_Weekly/_Monthly_Schedules)

You can pass backup-level as parameter to mysql-zrm-scheduler


April 11th, 2008, 04:19 AM
hi !

I configured ZRM now this way:
1 0 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyFullBackup --interval daily
0 6 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyIncrementalBackup --backup-level 1 --interval daily
0 12 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyIncrementalBackup --backup-level 1 --interval daily
0 18 * * * /usr/bin/zrm-pre-scheduler --action backup --backup-set DailyIncrementalBackup --backup-level 1 --interval daily

But the thing I don't know is how can I tell him to do a incremental backup from the last full backup because in the index file of the incremental sets it is always referring to the last Incremental (even if it is the incremental from 06:00) and not the daily backup from 00:01.



April 11th, 2008, 10:18 AM
ZRM incremental backup contains changes since last full backup or last incremental backup.

I think you are looking for differential backup (backup since last full backup). Is this correct?


April 13th, 2008, 11:12 PM
Yes I'm looking for something like that

April 14th, 2008, 01:11 AM
[QUOTE=arnold_mad;3784]Yes I'm looking for something like that[/QUOTE

Could you let us know what the underlying requirement is since the way we do incremental backups is by backing up the binary log files, you do not really need to do differential backups?

In a differential backup what you would end up doing is copying all of the binary logs since the last full backup into the differential backup. In case of using multiple incremental all that is done is to copy just those binary logs that was created since the last incremental backups. So incremental backups are much faster. In case of storage space needed the incremental would need marginally more space since we need to store the index files in addition. But the space taken by one index file is very marginal. In case of restore speeds, the time taken to restore from the differential or the set of incremental would be also pretty similar.

If you are using the enterprise version, the restore of multiple incremental is done in a transparent manner so you don't need to actually go and select each of the incremental backups separately. All you need to do is to specify the start date and end date between which you want to do the restore.