# available only in SQL Backup 7.0 and newer
In prior versions of SQL Backup, you had the option of deleting
old backup files using the ERASEFILES option. If your database
files were backed up locally, and these files are then copied to a
network share, you could implement different retention periods for
the local and remote files, using a combination of the ERASEFILES and ERASEFILES_REMOTE options.
However, you would have problems implementing different
retention periods if both your backup file and copies of it were
kept locally, or if both were kept on remote shares. In SQL
Backup 7, two new options were introduced: ERASEFILES_PRIMARY and ERASEFILES_SECONDARY.
The retention period for ERASEFILES_PRIMARY applies to the backup
file and any mirrored files (using the MIRRORFILE option). The retention
period in ERASEFILES_SECONDARY
applies to any copies of the backup files, created using the
COPYTO option.
Say you have a backup job that backs up your databases to a
network share (\\fileserver_backups\backups\) and a copy
of the backup file is made to a different network share
(\\fileserver_backupcopies\backupcopies\).
You want to retain 5 days worth of backups on '\\fileserver_backups\backups\' and 10 days
worth of backups on '\\fileserver_backupcopies\backupcopies\'.
You can do this using the following:
Document history
5/8/2012 | Initial release. |