Hi All,

I'm sure this has been asked before but I'm unable to find it. I would like to add multiple network shares to the "Copy To" option but I am unsure of the syntax. Can someone help me out?

Thanks,

Josh
JoshDBGuy
0

Comments

2 comments

  • petey
    Use multiple COPYTO switches e.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = [<AUTO>] WITH COPYTO = [\share01sqlbackups<DATABASE>], COPYTO = [\share02sqlbackups<DATABASE>], COPYTO = [\share03sqlbackups<DATABASE>] " '
    
    Note that the backup only completes when the file(s) have been copied to all your COPYTO destinations, and will require a longer backup window. For transaction log backups, the files are copied by a separate process, so the backup completes without waiting for the files to be copied.
    petey
    0
  • JoshDBGuy
    That's perfect, thank you so much.
    JoshDBGuy
    0

Add comment

Please sign in to leave a comment.