Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


July 2000

Using Ntbackup with Win2K and NT


RSS
Subscribe to Windows IT Pro | See More Backup and Recovery Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Undocumented Ntbackup Registry Keys, Putting the Win2K Backup Wizards to Work, Ntbackup Exchange Server 5.5 Bug Fix

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.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Storage Whitepapers Turn to a Proven Server and Storage Migration Solution

The Impact of Disk Fragmentation on Servers

Take Control of Your Email: Understand the Business Reasons for Email Storage Management

Related Events Backup – The Backbone of Your Business

Disk-to-Disk Grows Up

Effectively Shrinking Your Backup Window – with CA ARCserve Backup Data De-duplication and the Riverbed Steelhead Appliance

Check out our list of Free Email Newsletters!

Storage eBooks A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Keeping Your Business Safe from Attack: Encryption and Certificate Services

Related Storage Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement