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

Backing up Logs for multiple databases.

jhboricuajhboricua Posts: 41
edited June 21, 2011 5:40PM in SQL Backup Previous Versions
To do either a full or diff backup of all my user databases I can use:

What's the proper way to do Log backups on all user databases? When I look at the BACKUP command page on Red Gate Support, I don't see an option to use USER DATABASES listed for log backups.

Can someone clarify what's the proper syntax?

Is it:
EXECUTE master..sqlbackup '-SQL "BACKUP USER LOGS TO DISK....


  • Options
    peteypetey Posts: 2,358 New member
    EXEC master..sqlbackup '-sql "BACKUP LOGS [*] TO ..." '
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    Thanks petey. That worked, except that the model database was included in the list of databases that was backed up.

    After some more reading I found that doing:
    EXECUTE master..sqlbackup '-SQL "BACKUP LOGS EXCLUDE [model] TO ....

    was the way to go. This backs up all my user databases while excluding the model database.
Sign In or Register to comment.