Differential Backup

  • Backup strategy:

    Full backup on Sundays. 4 sets kept

    Differential nightly Monday-Saturdays.

    I want to setup a job for differential backup which will function just like maintenance plan for full backup where it creates new file per day and older files are deleted let's say after 14 days.

    How can this be done with differential? If I create job using:

    BACKUP DATABASE NWIND

    TO DISK = 'C:\BACKUP\Nwind_Diff.bak'

    WITH DIFFERENTIAL

    This will append the backups to Nwind_diff.bak. My worry is how to restrict it to let's say 14 days so that on day fifteen it overwrites day 1's backup or some how create separate backup files that will be deleted after 14 days?

    Thanks in advance.

  • Does your script overwrite existing file?

  • Yes the one above does overwrite. However, I would like separate diff backup files created nightly and be deleted after 14 days.

    Any idea how?

  • Hi,

    BACKUP DATABASE NWIND

    TO DISK = 'C:\BACKUP\Nwind_Diff.bak'

    WITH DIFFERENTIAL, retaindays=14

  • There are numerous scripts on this site that will write a new file based on the date. I'd recommend different dates since I've had issues iwth a single file before.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply