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

Copying to multiple network locations

I currently use Backup Pro to make a local backup and then copy that file to a network share. I would like to copy the file to a couple of other places, also. Is there a way to use Backup Pro to accomplish that?

If I can do it directly from Backup Pro, any other suggestions? I was considering something with Robocopy or perhaps PowerShell...
RichardRayJH
0

Comments

3 comments

  • petey
    Use multiple COPYTO parameters e.g.
    EXEC master..sqlbackup '-sql "BACKUP ... WITH COPYTO = [networkshare1\backups\], COPYTO = [networkshare2\backups\], COPYTO = [networkshare3\backups\] ...
    
    petey
    0
  • RichardRayJH
    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?
    RichardRayJH
    0
  • petey
    Yes, adding more COPYTO parameters is all you need to do.
    petey
    0

Add comment

Please sign in to leave a comment.