What are the challenges you face when working across database platforms? Take the survey

Baking up Multiple DB's to Separate directories.

JyorkJyork Posts: 4 Bronze 2
edited July 25, 2006 12:39PM in SQL Backup Previous Versions

I was wondering if there was an easy way (outside of separate jobs) to create a backup of databases each to their own directories within a location. An example of this is already present in Enterprise Manager's Database Maintenance Plan Wizard. You can chose multiple db's to back up in a specific location, each with their own sub-directory. Is this possible to accomplish via the GUI(didn't see it there) or by editing the script that is created in the SQL Agent job? Any help is appreciated. Thanks!


  • Options
    peteypetey Posts: 2,358 New member
    You could use the database tag as part of the folder name. E.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [G:\Backups\<DATABASE>\<AUTO>] " '

    The option to do this via the GUI isn't available. The workaround is to add the tag as part of the 'Backup folder' value in Step 3 of the Schedule Backup wizard.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    JyorkJyork Posts: 4 Bronze 2
    Perfect- Thanks for the quick response!
Sign In or Register to comment.