Network Copy to Multiple locations
olafdedig
Posts: 2
Hello
I am using SQL back up 7 to do our backups, part of that is we use the copy to network location functionality. Is it possible to copy the backup to more than one location within the same backup task ? for example do backup then copy to location \\servername\dbbackups\ and the copy to \\otherservername\dbbackupsThanks
I am using SQL back up 7 to do our backups, part of that is we use the copy to network location functionality. Is it possible to copy the backup to more than one location within the same backup task ? for example do backup then copy to location \\servername\dbbackups\ and the copy to \\otherservername\dbbackupsThanks
Comments
Yes it is possible to copy a backup to more than one location. You will need to edit the backup script, as this option is not available in the Back Up or Schedule Backup Jobs wizards. You can copy the script from the last step of the wizard, then edit and run it from SQL Server Management Studio.
To copy a backup to another location, add COPYTO = '\\location\backups' to the WITH clause of the BACKUP command. You can include multiple COPYTO options to a BACKUP command. For example:
The SQL Backup Agent service must have permission to write to the COPYTO locations.
More information on the COPYTO option is available here: http://www.red-gate.com/supportcenter/Content/SQL_Backup/help/7.2/SBU_BACKUP_cmd
I hope that helps.
Cheers,
Marianne
Red Gate Software Limited
It is most definitely possible for SQL Backup to use multiple COPYTO parameters.
However you cannot configure this using the wizards available through the SQL Backup GUI.
If using the backup wizard you will need to script out the backup task to a new query window and manually add the second COPYTO comand. You can obtain the backup script in the last step of the Backup wizard via the script tab.
Or if you wish to modify a scheduled backup job, open SSMS ->SQL Agent ->Jobs ->locate the job SQL backup created ->Right Click and select properties ->Steps->Edit the job step and manually add the second COPYTO command.
Below, I have included Backup job syntax with two COPYTO parameters for reference, my example uses the code from a scheduled backup job:
I hope the above answers your question.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com