Use the following procedure to automate online backups of the information store and directory service.
From the Windows NT Resource Kit compact disc, install the Winat.exe program on the local Windows NT directory of your local computer (for example, on the Winnt35 directory).
Create a Windows NT common group called Microsoft Exchange Server Backup.
Create an icon for the Winnt35\Backup.log file. This provides quick access to review the backup log.
Copy the Ntbackup.exe icon from the Administrative Tools group to the Microsoft Exchange Server Backup group.
Create an icon for Winat.exe in the Microsoft Exchange Server Backup group.
In Control Panel, double-click the Services icon.
Select the Schedule service and choose Startup. Configure for automatic startup and assign an ID that is a member of the Windows NT Backup Operators group. Make sure to enter the correct password. If the administrator ID password changes, you must change the password for the Schedule service.
Start the Schedule service.
Create the backup batch file. Name this file Back.bat and save it in the Winnt35 subdirectory.
Run the Winat.exe program and schedule the Back.bat file. You do not need to have a logon session on the computer in which Winat.exe is running because the Schedule service will log on to perform the operation under the defined security context. Set the batch job for interactive mode.
Following is a sample batch file you can use for backing up your files while the server remains online.
rem ** 3/7/96 Backup Written by <name>
rem ** This will back up the information store and directory service on <server_name 1> and <server_name 2>.
ntbackup backup DS \\Server_name1 IS \\Server_name1 /v /d "Server-name1 IS-DS" /b /t Normal /l c:\winnt35\backup.log /e
ntbackup backup DS \\Server_name1 IS \\Server_name1 /a /v /d "Server_name1 IS-DS" /b /t Normal /l c:\winnt35\backup.log /e
exit
You may need to experiment with the order in which you stop the services, so that you are not prompted when a service is dependent upon the one you are stopping.
rem ** Stop Microsoft Exchange services.
rem ** You can stop Microsoft Exchange services and restart them automatically to backup.
rem ** Files that a particular service may hold open
REM // stop all services
echo Stopping Services...
net stop MSExchangeMSMI
net stop MSExchangePCMTA
net stop MSExchangeFB
net stop MSExchangeDX
net stop MSExchangeIMC
net stop MSExchangeMTA
net stop MSExchangeIS
net stop MSExchangeDS
net stop MSExchangeSA
ntbackup backup c:\ d:\ /a /v /d "Full File Based Backup" /b /l c:\winnt35\backup.log /e
REM edbutil OPTIONS
net start MSExchangeSA
net start MSExchangeDS
net start MSExchangeIS
net start MSExchangeMTA
net start MSExchangeIMC
net start MSExchangeDX
net start MSExchangeFB
net start MSExchangePCMTA
net start MSExchangeMSMI
You can start and stop PCMTA services by enclosing the service name in quotation marks. You can determine the service names from the Microsoft Exchange Server Administrator program, the Windows NT Control Panel, or by viewing the Windows NT registry.
If you are viewing the Windows NT registry, select
HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services.
All services are listed in alphabetical order.
rem Batch File To Stop and Restart Microsoft Exchange Services
rem For File Based Backup
echo Stopping Services ...
net stop MSExchangeMSMI
net stop MSExchangePCMTA
net stop MSExchangeFB
net stop MSExchangeDX
net stop MSExchangeMTA
net stop MSExchangeIMC
net stop MSExchangeIS
net stop MSExchangeDS
net stop "PC MTA - HUB"
net stop MSExchangeSA
ntbackup BACKUP d:\exchsrvr\mdbdata /v /d "File Based Backup" /b /l c:\winnt35\backup.log /e
net start MSExchangeSA
net start MSExchangeDS
net start MSExchangeIS
net start MSExchangeMTA
net start MSExchangeIMC
net start MSExchangeDX
net start MSExchangeFB
net start MSExchangePCMTA
net start MSExchangeMSMI
net start "PC MTA - HUB"