In the course of doing email migrations, moving the mail to the new server or servers creates a 1:1 ratio of log files to migrated mail. In some environments, this can lead to drive space issues - especially when the number of users or size of mailboxes creates large databases. By migrating batches of users and running full backups as part of each migration run, the resulting log files are truncated; this methodology mitigates the need for excessively large transaction log storage. Another ad hoc need is for simply doing quick backups of storage groups when the normal backup method is failing. And finally, smaller environments may not wish to invest in complex storage hardware and expensive backup software.
NTBackup, which shipped as part of Server 2003, is perfect for these tasks. Installing Exchange 2007 on Server 2003 extended NTBackup to work with Exchange. With Server 2008 the situation changes.
Exchange 2007 and Server 2008 do not play with NTBackup primarily because NTBackup is no longer part of Server 2008. Exchange 2007 still has the streaming backup API’s, so the issue is getting NTBackup to work on Server 2008. There are multitudinous blogs out in cyberspace showing how to do that, so this blog article will rehash them a bit, add a few more tidbits, and in the very end, bring all those disparate sources into one spot.
Exchange 2007 SP2 does have native backup with Server 2008; however this solution is volume-based, and if the volume is large, you get be making a 200-300GB (or larger) backup just to grab a 50GB storage group. Alas! This NTBackup on Server 2008 trick does not appear to work, so far as I can tell, with Exchange 2010RC. For Exchange 2010 you will need to use the VSS writer and the Windows Server Backup that gets the entire volume at once. For both Exchange 2007 and 2010, after the volume containing the Exchange database(s) is part of the backup, you can to restore just the Exchange data.
As a parenthetical note, you can do this same technique for Vista by using an XP source and copying the files to a Vista box. Vista (and Windows 7) has a volume-based backup scheme (ala Server 2008) and not the traditional NTBackup that has been around since mid-90’s.
Parenthetical note #2: Microsoft has a downloadable, made for Server 2008, Windows NT Backup - Restore Utility. Now, I know it says “backup - restore” in the title, but what it should really say is “restore your Server 2003 backup” - got it? This tool will not enable you to make NTBackup runs against your Exchange 2007. Here is the download location for this misleadingly named utility. You DO want this if you need to restore a Server 2003 BKF file onto a Server 2008 file system.
Now, onto the technique to use NTBackup with Exchange on Server 2008. For our purposes, you will need to get your NTBackup and supporting files from a 2003 Server.
Access a Windows Server 2003 computer and copy the following files to a folder of your choice; and make a folder, doing this will allow you to have a package that you can simply copy onto the Windows Server 2008-based Exchange 2007 server and then you can just run it from there. So, make the folder, and copy all the following files into it for later distribution.
- NTbackup.exe (found in c:\windows\system32)
- NTMSapi.dll (also found in system32)
- vssapi.dll (also found in system32)
- esebcli2.dll (find this in the setup\i386\exchange\bin folder on the setup CD - or from an installed e2k3 server in the c:\program files\microsoft\exchange\bin folder)
So now you have your files in a folder. Copy the entire folder to an easy-to-remember (and type) location on the Server 2008 host. I put it at the root of C: in a folder called NTBackup. This makes the path to this folder “C:\NTBackup.” While you can get fancy and place the files somewhere in the system path, I prefer to run it from a single folder. To do so will require us to modify the registry a bit (details/background available in MS KB 275876). We also need to install the Removable Storage Manager on the Server 2008 host. As always, before modifying the registry, either export the affected key or deliberately backup the registry so you can recover or fall back to your previous configuration.
On your Server 2008, open the Server Manager, go to Features, and install the Removable Storage Manager. You will need this if you expect to backup to tape. Then, open regedit and tweak the following key:
Double-click the DLLPaths key, and then add the following value:
Value Name: Esebcli2
Data Type: REG_EXPAND_SZ
String: Drive\Path\Esebcli2.dll (remember to change this to c:\ntbackup)(or wherever you put your folder)
When you open NTBackup on the 2008 server, you will get an error message saying that NTBackup cannot contact the Remote Storage Manager. If you are like me, you will write this off to “I don’t have any removable storage” so nyaah!
Or, you can just hit the check box not to be bothered again. For our Exchange purposes, it works just fine. Moving on...
After working through the “Schedule Jobs” “Add Job” routine inside the NTBackup GUI, here is what shows up in the Server 2008 Task Scheduler:
Voila! Now edit the run properties of this task to point to the correct location of the NTbackup.exe - the NTBackup GUI inserts the task to run from c:\windows\system32. In Server 2008 task scheduler, if you want this to be able to run whenever you wish (right click, run) then you will have to add a trigger for run once to the job.