Options

Delete Existing Backup From Network

edited September 10, 2009 4:40AM in SQL Backup Previous Versions
I am backing up my SQL Server database to a network location, even though Redgate recommends against it, because I am short of space on my database server.

I have the "Delete existing backup files" option checked along with "All files except the latest 5". I noticed that old copies of my backups were not being deleted and I found this in the help file:

"Note that if you specify a network path in the backup location folder (not recommended), any network copy location options you specify will be applied to files at this path. Similarly, if you specify a local path in the network copy location folder, any backup location folder options will be applied to the copied files in the (local) network copy location."

Arrgggh! You mean I can't backup to a network and delete the old copies, event if I really want to?

Please don't suggest I backup locally, I just don't have the space right now.

Regards,
Mark Bricker

Comments

  • Options
    Hi Mark,

    As you've discovered, the options you want are greyed out when then part of the form is unused.

    However, you can manually specifiy "WITH ERASEFILES_REMOTE = 5B" via T-SQL.

    Please create a scheduled backup job and then, from Management Studio, edit the the job step in this task (under SQL Server Agent > Jobs) and add the above parameter.

    The FILEOPTIONS parameter should also be considered (usage described here).

    Hope this helps,
    Robin Anderson
    Development
    Red-Gate Software
Sign In or Register to comment.