Going all the way back to the Exchange 5.5 days, I’ve preferred doing disk-to-disk-to-tape Exchange backups. I’ll use NTBackup for the disk-to-disk part, and the fixed file backup agent that comes with whatever backup software we happen to be by for the to-tape part. This means eschewing the Exchange backup agents that most vendors provide, which in my mind is a huge plus. Opinions will certainly vary, but by this method provides cost savings, quick restore times, superfluous protection and redundancy, and the reassurance that comes with by the native Exchange backup attention. If you need more convincing, there are a few white papers from Microsoft describing this same setup as the Exchange backup method used by their in-household staff.
A client that is now by this configuration has just surpassed the 200 GB mark for their combined mailbox store size, and the nightly full backups were taking a small longer than 6 hours to complete. This large backup window was preventing the nightly database maintenance tasks from carrying out, so a new strategy was in order. While thinking through some possibilities, I remembered reading about some registry tweaks that may possibly improve the NTBackup performance when backing up to disk. After a small investigate, I made the changes, and the consequences were nearly unbelievable: the Exchange backup job that had previously taken more than 6 hours to complete now finished in just under 2 1/2 hours!
While taking advantage of this dramatic speed boost only requires three registry changes and an additional command line parameter, there is a huge let-down at first glance: the NTBackup registry keys that need to be changed reside in the HKEY_CURRENT_USER hive. This really cramps my style as I always configure the scheduled task that kicks off the NTBackup job as the NT AUTHORITY\SYSTEM account with a blank password. If you work in an environment with strict password exchange policies, even for system accounts, you know the pain of having to maintain passwords in scheduled tasks and scripts. Life is so much simpler if it can just be avoided. But since the system account doesn’t do NTBackup interactively, the registry keys don’t get made, and I assumed this meant there was no way to have the attention check for the configuration tweaks.
But thankfully I was incorrect, and it’s a pretty simple process to manually make the necessary keys in the right spot:
- First of all, you need to really complete a backup job once to get the registry entries all set up, so as a fixed administrator on the Exchange server, launch NTBackup, select a single temp file somewhere to backup, let the job run to completion, and then just delete the temporary backup set.
- Launch regedit, and drill down to
HKEY_CURRENT_USER\Software\Microsoft\Ntbackup\Backup Engine - You should already see the values we’re about to exchange, if not, something didn’t get made by the book, so try a manual NTBackup job again. If the keys are present, make the following changes:
- Exchange Logical Disk Buffer Size from 32 to 64
- Exchange Max Buffer Size from 512 to 1024
- Exchange Max Num Tape Buffers from 9 to 16
- After making the changes, select the Backup Engine key from the left pane, and right click and select Export. Save it as a .reg file, and make sure Selected branch at the bottom of the Export window is set to
HKEY_CURRENT_USER\Software\Microsoft\Ntbackup\Backup Engine - Now we’ll locate the system account’s registry settings, with regedit still open, browse to
HKEY_USERS\S-1-5-18\Software\Microsoft\Ntbackup. TheS-1-5-18is the standard identifier for the system account, and unless you’ve scheduled NTBackup to run asNT AUTHORITY\SYSTEMbefore, the key will most likely be empty. - We need to schedule a job to run as
NT AUTHORITY\SYSTEMto make the defaulting keys, so launch NTBackup in advanced mode, select the Schedule Jobs tab, and set up a temp job to just back up any text file and schedule it to run in a couple of minutes from now. When prompted for the credentials that should be used for the job, you’ll need to exchange the user account toNT AUTHORITY\SYSTEMwith a blank password, several times. In fact, it still won’t save it as the account to use, so after saving the scheduled job, open the task from the Scheduled Tasks panel and exchange the user account toNT AUTHORITY\SYSTEMwith a blank password again. - After the job runs, you should see the following registry keys have been made under
HKEY_USERS\S-1-5-18\Software\Microsoft\Ntbackup; Backup Engine, Backup Utility, Show, and Log Files. But if you drill into Backup Engine, you’ll see it didn’t make the keys we modified a few steps ago. - To easily make the keys, just edit the .reg file we exported earlier in Notepad. Exchange the line
[HKEY_CURRENT_USER\Software\Microsoft\Ntbackup\Backup Engine]to[HKEY_USERS\S-1-5-18\Software\Microsoft\Ntbackup\Backup Engine], and save the file. - Now right click the .reg file, and select Merge. You should find the registry settings have been made for the system account, and NTBackup will now use the much speedier settings even when running as the system account.
There’s another performance mod we need to make to give the backup even more boost. Since Windows Server 2003 Service Pack 1, NTBackup has been equipped with a secret and offensively named /fu switch, for ‘file unbuffered’ mode. To bolt this on, just edit the Scheduled Task for the NTBackup job, and add the /fu switch after the /hc:off parameter. When you’re done, the Run: text box of the Scheduled Task will look something like this:
C:\WINDOWS\system32\ntbackup.exe backup "@C:\ID and Settings\
Administrator\Local Settings\Attention Data\Microsoft\Windows NT\
NTBackup\data\Exchange_Daily.bks" /n "exchange_Backup.bkf made
6/30/2009 at 6:06 PM" /d "Set made 6/30/2009 at 6:06 PM" /v:no
/r:no /rs:no /hc:off /fu /m normal /j "Exchange_Daily" /l:s /f
"E:\exchange_ backups\exchange_Backup.bkf"
Check it out:Virtual Foundry









Answers Rating