Copy backup to network auto deletion
morne3107
Posts: 6
How do you setup SQL Backup to delete the copies made to an offsite location after several days. The normal removal of Backups older than "X" days works fine, but the copy to an offsite location does not provide you with that option?
Is this possible?
Is this possible?
Comments
E.g. will delete all relevant files older than 5 days in the e:\backups and \\fileserver\backups folders.
will delete all relevant files older than 5 days in the e:\backups folder, and files older than 7 days in the \\fileserver\backups folder.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I need to delete the network backup after "X" days, however, it should be the same value as the local backups. so the deletion days would not differ between local and network.
Please advise?
You will need to create the backup job first using the available options. Once the job has been created, use Query Analyzer or Management Studio, open that SQL Server Agent job, and edit the syntax to include the FILEOPTIONS and ERASEFILES_REMOTE options as required.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
I get the error:
If i remove ERASEFILES_REMOTE then the script will run BUT it doesn't remove the relevant files from either the local folder OR the network.
Also, does anyone have a list of what the options of FILEOPTIONS actually are? I know they're from 1-7 but can't find anything that tells me what each value represents....
Running v5.2 on sql server 2005 (Win 2k3 server)
many thanks
This still doesn't explain my issue with the erasefiles = 3 not removing any backups for that DB older than 3 days. I've even tried it at 3h but still no luck....
any ideas??
network tools