Copy to network and multiple folders

brosatobrosato Posts: 89 Bronze 2
edited October 4, 2008 5:12AM in SQL Backup Previous Versions
When backing up multiple jobs and using copy to network, why does it copy them all to the same folder? It should use the the same options as it does when it creates the local file and create seperate directories for each database. Am I missing something?

Comments

  • peteypetey Posts: 2,358 New member
    If you provide an explicit file name in the COPYTO option, all the backup files will be copied to the same folder. If you want the files to be copied to different locations depending on the backup attributes, you can use tags to specify the locations. E.g.
    EXEC master..sqlbackup '-sql "BACKUP ... WITH COPYTO = ''\\fileserver\backups\<DATABASE>\'' ..." '
    

    See here for details on the available tags.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.