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

Enhancement Request - Assist Tape backup

I'd like to make a request for enhancement to SQL Backup. But first, I would like to see if other people would benefit from this addition.

Request: Additional backup parameter that restricts 'ERASEFILES_ATSTART' to files without an archive bit.

Maybe two(2) values that work similar to the following if archive bit exists:
1 : abort, raiserror
2 : continue, no erase

The scenario:
Daily SQL backup job completes at 1:00AM with ERASEFILES_ATSTART=1h.
Tape pickup job begins at 2:00AM, but encounters an error and is not corrected for over 24 hours.
Next execution of Daily SQL backup job erases previous copy.

In my scenario the tape pickup software turns off the archive bit.


Anyone else have a use for this, please comment.
thanks.
epetro
0

Comments

2 comments

  • petey
    With regards to the archive bit, set bit 2 of the FILEOPTIONS value so that only files with an inactive archive flag are deleted e.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASE ... WITH ERASEFILES = 2h, FILEOPTIONS = 2"'
    
    For more details, see the following topic in the SQL Backup help: The SQL Backup Toolkit > Toolkit syntax > The BACKUP command. Look for the FILEOPTIONS explanation.
    petey
    0
  • epetro
    I tested this locally and it seems to work fine.

    Thanks.
    epetro
    0

Add comment

Please sign in to leave a comment.