Question about ERASEFILES and MIRRORFILE

knockoutknockout Posts: 8
edited January 17, 2008 12:13AM in SQL Backup Previous Versions
Hi,

I had a couple of questions regarding ERASEFILES and MIRRORFILE.

ERASEFILES = '7h'. Does this delete anything in the folder that is older than 7 hours when the backup starts or when the backup ends?

If I have my DIFF and T-LOG backups going to the same folder and I specify my DIFF job to use the ERASEFILES options, will it also remove T-LOG backups that are older than the specified period (this is my intended behavior).

Also, how does MIRRORFILE differ from COPYTO. Does MIRRORFILE write to the secondary location as the backup is being created and COPYTO only at the end or am I missing something.

Thanks!

Comments

  • peteypetey Posts: 2,358 New member
    - ERASEFILES deletes files that are older than the specified interval at the end of the current backup. There is ERASEFILES_ATSTART that performs the deletion at the beginning of the backup.

    - ERASEFILES only deletes backup files for the same database, and of the same backup type

    - your statement re MIRRORFILE and COPYTO is correct.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.