How can we help you today? How can we help you today?

Backup files not being deleted

Running SQL Backup 5.1.0.2781 on SQL Server 2005 (SP2)

This is the command thats being issued,
BACKUP DATABASE [myDB]  TO DISK = 'H:\backup_share\<AUTO>.sqb' 
WITH NAME = '<AUTO>', DESCRIPTION = '<AUTO>', 
COPYTO = '\\SQL2\db', FILEOPTIONS = 7, 
ERASEFILES = 2, COMPRESSION = 2, THREADCOUNT = 7

By my reading SQL Backup should be erasing all files that are more than two days old in both the primary and COPYTO locations, which it is not doing. No files are being deleted at all.

If the command is not correct, please advise what I need to change so the command works.

Thanks
Phil
philcart
0

Comments

2 comments

  • petey
    The using FILEOPTIONS = 7, which includes bitmask 1 (the value 2), SQL Backup will only delete files that do not have the archive attribute.

    The archive attribute is usually set by default. It is usually cleared by tape backup applications, to indicate that the file has been archived to tape, and need not be archived again.

    If you want to delete the file regardless of the archive attribute, then use FILEOPTIONS = 5.
    petey
    0
  • philcart
    So will FILEOPTIONS=5 delete files in both the primary and COPYTO locations?

    Thanks
    philcart
    0

Add comment

Please sign in to leave a comment.