Comments
3 comments
-
Use multiple COPYTO parameters e.g.
EXEC master..sqlbackup '-sql "BACKUP ... WITH COPYTO = [networkshare1\backups\], COPYTO = [networkshare2\backups\], COPYTO = [networkshare3\backups\] ...
-
So if the EXEC statement looks like:
EXECUTE master..sqlbackup '-SQL "BACKUP DATABASE [RTPOne] TO DISK = ''S:\Backup\RTP-Data\<AUTO>.sqb'' WITH ERASEFILES = 7,
ERASEFILES_REMOTE = 15,
FILEOPTIONS = 4,
MAILTO = ''isadmin@jacksonhole.com'',
DISKRETRYINTERVAL = 30,
DISKRETRYCOUNT = 10,
COMPRESSION = 4,
COPYTO = ''\\n-cali\sqlbackups\RTPSQL\DataFileBackups\RTPONE'',
THREADCOUNT = 15,
VERIFY"',
@exitcode OUT,
@sqlerrorcode OUT
then all I need is more COPYTO's and the same ERASEFILES REMOTE will apply? -
Yes, adding more COPYTO parameters is all you need to do.
Add comment
Please sign in to leave a comment.
If I can do it directly from Backup Pro, any other suggestions? I was considering something with Robocopy or perhaps PowerShell...