Comments
4 comments
-
Could you please post the backup command you are using to back up your databases? Thanks.
-
I opened a ticket. I don't want to make you do repeated work. I'll post the results of the ticket here for Google.
-
If it helps, the most common cause of the delay is when you:
-
- backup a lot of databases using the BACKUP DATABASES syntax
- to the same folder
- and use the ERASEFILES option to delete older backup files
What you can do is to place each database's backup files in its own separate folder using the <DATABASE> tag e.g. instead ofEXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<AUTO>]... " '
useEXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<DATABASE>\<AUTO>]... " '
Now, SQL Backup needs to scan only that specific database's folder to determine which file(s) to delete, which speeds things up significantly. If that is still too slow, you can add another subfolder based on the backup type using the <TYPE> tag e.g.EXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<DATABASE>\<TYPE>\<AUTO>]... " '
-
petey wrote:If it helps, the most common cause of the delay is when you:
-
- backup a lot of databases using the BACKUP DATABASES syntax
- to the same folder
- and use the ERASEFILES option to delete older backup files
What you can do is to place each database's backup files in its own separate folder using the <DATABASE> tag e.g. instead ofEXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<AUTO>]... " '
useEXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<DATABASE>\<AUTO>]... " '
Now, SQL Backup needs to scan only that specific database's folder to determine which file(s) to delete, which speeds things up significantly. If that is still too slow, you can add another subfolder based on the backup type using the <TYPE> tag e.g.EXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\netshare\backups\<DATABASE>\<TYPE>\<AUTO>]... " '
Brilliant post Petey. With over 400 databases things were taking forever. Now I have them all in their own folders. Thanks for saving me a lot of time.
Add comment
Please sign in to leave a comment.
I setup a job on another one of my servers that has a similar number of databases, and there is no delay between backups.
The log isn't giving me any insight in why this would be.
Thanks!