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:
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:
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:
Optionally, you can inform the user when the backup has completed. To do so, add the following line to your file:
Save the file as, for example, backup.bat in the NT directory and close the file editor. At the command prompt, type
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.