A. My company has a Windows NT 4.0 network on which we've installed Microsoft Exchange Server. I'm weary of performing nightly manual backups of the C partition. Do you have a script that I can use to automate the NT backup process?
The following batch file lets you automate the backup of a local partition. However, this batch file is inappropriate for more complex network partitions and won't let you back up remote registries. For those situations, you need to invest in a backup application such as VERITAS Software's VERITAS Backup Exec or Computer Associates' (CA's) ARCserve. Writing even a simple local NT backup batch file can be laborious. To do so, open your favorite file editor. I recommend MS-DOS Editor, which you access from a command line by typing
Your batch file first needs to use the Net Stop command to stop all Exchange Server services. (You can't back up an active service.) Type the following:
net stop MSExchangeMSMI /y net stop MSExchangePCMTA /y net stop MSExchangeFB /y net stop MSExchangeDX /y net stop MSExchangeIMC /y net stop MSExchangeMTA /y net stop MSExchangeIS /y net stop MSExchangeDS /y net stop MSExchangeSA /y
The /y switch automates the process of stopping the services by answering yes to the series of questions that the user must typically answer as the system prepares for the backup. Next, type the following backup command into your file editor:
ntbackup backup C: /b /hc:on /t:normal /l:"%windirlogfiles\backup.log" /tape:0
where the /b switch backs up the registry, the /hc:on switch enables hardware compression, the /l switch tells the backup process to write the results to a file in the NT directory's \logfiles subdirectory, and the /tape:0 switch determines which tape device to use. (The 0 registry syntax directs the backup to the first tape device.)
To restart the Exchange Server services, type the following lines into your file editor:
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
Optionally, you can inform the user when the backup has completed. To do so, add the following line to your file:
net send user BACKUP FINISHED
Save the file as, for example, backup.bat in the NT directory and close the file editor. At the command prompt, type
at 2:00am /every:sunday "backup.bat" /interactive
where the /interactive switch handles any potential errors. This command tells the command scheduler to run backup.bat every Sunday at 2:00 a.m.