Delay between backups on SQL Backup Pro

Compresses, encrypts, secures and monitors SQL Server backups.

Delay between backups on SQL Backup Pro

Postby ike@ikeellis.com » Wed Mar 19, 2014 11:54 pm

I see a delay in my backup logs of five minutes. I have 150 small databases to backup. The actual backup takes less than a minute, bu then it's another five minutes between when the next backup begins. Why is this?

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!
Ike Ellis
ike@ikeellis.com
 
Posts: 2
Joined: Tue Aug 13, 2013 11:34 pm
Location: San Diego, CA

Postby petey » Thu Mar 20, 2014 10:28 am

Could you please post the backup command you are using to back up your databases? Thanks.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2234
Joined: Sun Apr 24, 2005 12:34 pm

Postby ike@ikeellis.com » Thu Mar 20, 2014 10:57 pm

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.
Ike Ellis
ike@ikeellis.com
 
Posts: 2
Joined: Tue Aug 13, 2013 11:34 pm
Location: San Diego, CA

Postby petey » Fri Mar 21, 2014 2:28 am

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

In these situations, there will be a lot of files in that single folder, and after every database backup, SQL Backup will scan every single file in that folder to determine which file it needs to delete. This issue will be compounded if you back up to a network share, as the scanning process will take even longer.

What you can do is to place each database's backup files in its own separate folder using the <DATABASE> tag e.g. instead of

Code: Select all
EXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\\\netshare\\backups\\<AUTO>]... " '

use
Code: Select all
EXEC 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.

Code: Select all
EXEC master..sqlbackup '-sql "BACKUP DATABASES [*] TO DISK = [\\\\netshare\\backups\\<DATABASE>\\<TYPE>\\<AUTO>]... " '
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2234
Joined: Sun Apr 24, 2005 12:34 pm


Return to SQL Backup 7

Who is online

Users browsing this forum: No registered users and 1 guest