PDA

View Full Version : Duplicate Backups



fredsmithfreddie
March 22nd, 2008, 01:51 PM
Suppose I had the following backup schedule:

- Full Daily + Incremental every 6 hours/10D retention
- Full Weekly/2M retention
- Full Monthly/4M retention

I separate these because I want to use different retention intervals. My concern is that on the first of the month, all three full backups will run. My preference would be to just use full daily backups with a purging strategy that saves first-of-the-month/week backups for 2/4 months.

I realize that I could do full monthly with 6 hours incrementals; however, the recovery would require applying 120+ incrementals.

What's the best solution?

kkg
March 23rd, 2008, 09:53 PM
Suppose I had the following backup schedule:

- Full Daily + Incremental every 6 hours/10D retention
- Full Weekly/2M retention
- Full Monthly/4M retention

I separate these because I want to use different retention intervals. My concern is that on the first of the month, all three full backups will run. My preference would be to just use full daily backups with a purging strategy that saves first-of-the-month/week backups for 2/4 months.

I realize that I could do full monthly with 6 hours incrementals; however, the recovery would require applying 120+ incrementals.

What's the best solution?

One solution would be to write your own pre-scheduler plugin and specify this in the mysql-zrm.conf of the backup set.
The pre-scheduler plugin is used to determine if a backup should be run as per schedule or if it should be delayed or if it should not be run at all.

Schedule backups such that the monthly backup happens at 1:00AM, weekly backups happen at 3:00AM and daily backups happens at 5:00AM.

Then in the pre-scheduler plugin, you can check if the monthly or weekly backup has happened on the same date and if so exit with error code greater than 11. This will ensure that the weekly or daily backup will not happen on the same day as the monthly or weekly backups (respectively).

--kkg