Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  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 


Reader Comments
while taking backup through command line is there any command on command line to log only the Summary Only of the backup on to the logfile rather than the Full Detail logging.

Thanks


Hari January 28, 2002


Is there a detailed backup log on Windows 2000? If NO, do you have a sample batch file that can create a detailed backup log.

thanks

Jojo Espiritu April 26, 2002


I do not think the ntbackup backup D:\ /D "Important Files" /B /L "c:\winnt\backup.log" works in win2k. I cannot get the lof file to a specfic path

Marino May 21, 2002


OK, this backup thing is great, but I have a question that I can't find an answer to anywhere (not even TechNet). If you have one schedule for every friday and another for the last friday of every month, which takes priority or do you have to just put the corresponding tape in the drive

Phil H January 23, 2003


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

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

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...


Storage Whitepapers Combining Deduplication and VMware Disaster Recovery: Cascading Savings Improves Cost Effectiveness

Virtualizing Microsoft Exchange Server 2007

StoreVault SnapManagers for Microsoft Exchange and SQL Server

Related Events Virtualization Management

Virtualization 101

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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


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 Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing