You can migrate to Win2K to eliminate some of NTbackup's shortcomings, or you can work around them in NT
Windows NT's built-in backup program, ntbackup.exe, is good for quick, rudimentary file backups. In an enterprise environment, however, Ntbackup just doesn't have the necessary muscle. Enterprises need to run unattended backups during off-hours, but Ntbackup lacks a built-in scheduling facility. Enterprises also need to be able to back up remote resources and to maintain catalogs of backup media, but Ntbackup doesn't directly support these functions, either.
If you make the move to Windows 2000, you'll find that Microsoft has improved the new version of Ntbackup to address these three weaknesses. But not everyone is in a hurry to move to Win2K. For those of you who are sticking with NT for a while, I explain how to work around these Ntbackup weaknesses to schedule backups, back up resources on remote machines, and maintain catalogs of your media. And for those who are moving to Win2K, I explain how the new version of Ntbackup improves on NT's version in these areas.
Scheduling Backups
One of Ntbackup's shortcomings under NT is that the utility doesn't give you a way to schedule backups. Ntbackup's interface provides only for realtime archiving. In NT, you can work around this problem by using a scheduling service. Win2K's version of Ntbackup includes support for scheduled backups.
NT. If you don't have Microsoft Internet Explorer (IE) 5.0 installed, your NT system has a service called Scheduler. Scheduler executes commands that you might have scheduled by using the at.exe command-line utility or the Microsoft Windows NT Server Resource Kit's WinAt utility. Scheduler defaults to manual invocation, so if you plan to use Scheduler to execute backups, you might need to set it to automatic. After you start the Scheduler service, you can use at.exe to schedule events.
In IE 5.0, Microsoft replaced the Scheduler service with the beefed-up Task Scheduler. In addition to providing a friendly GUI, Task Scheduler lets you specify a user for each task so that you can carry out different tasks under different contexts.
After you start whichever NT scheduling service you choose to use, you can schedule backup scripts for execution. NT's Ntbackup version uses command-line parameters and switches to facilitate scripting. Executing the command ntbackup /? from the command line displays the part of the Help file that documents the switches that Ntbackup supports. A basic backup command might look something like
ntbackup backup D:\ /D "Important Files" /B /L "c:\winnt\backup.log"
This command tells Ntbackup to back up all files on the D drive, replacing anything that is currently on the tape. The /D switch tells Ntbackup to label the session Important Files. The /B switch backs up the Registry. The /L switch tells Ntbackup to log everything to the text file C:\winnt\backup.log.
After you write your backup command, you need to put it in a batch file for execution. Any batch file with a .bat or .cmd extension, such as fullbackup.bat or dailybackup.cmd, will do. Then, you can schedule batch file executions. The command
at 2:00 /every:F backup.bat
executes batch file backup.bat every Friday at 2:00 a.m.
You need to be aware of a couple of caveats about using Ntbackup. First, you can use a script to back up only a drive or directory; you can't use a script to back up one file. If you execute a script to back up a particular file, you'll receive the error message You do not have permission to access portions of filename. Microsoft TechNet explains that Ntbackup behaves this way by design. Neither the Win2K nor NT version of Ntbackup can back up individual files from the command prompt.
You also need to be sure you've loaded the correct tape. If a scheduled backup runs and you haven't swapped tapes, the scheduled backup will erase any data on the tape by default. One way to prevent a scheduled backup from accidentally overwriting the tape is to add a second command to your batch file. The command
ntbackup eject
ejects the mounted media. If you have more than one tape drive, you can use the /tape:number parameter to specify which tape the backup uses. Another option is to use Ntbackup's /A switch, which appends the new backup to any existing data on the tape instead of overwriting existing data.
Thanks
Hari January 28, 2002