Windows Tip Sheet
A backup plan that won't bog down your admin routine.
- By Jeffery Hicks
We all know the value of a good backup, but sometimes it’s just too darn hard to fit it in our schedule. This is especially true when we’re in a hurry. But not to worry: As long as you have access to a drive with adequate storage, you can get a quick backup of just about anything, from a single directory to an entire drive or the System State. At a command prompt, you can run the NTBackup utility and create a backup to a file. The utility has many parameters, but the basic syntax you need is this:
Tech Help—Just An
Got a Windows, Exchange or virtualization question
or need troubleshooting help? Or maybe you want a better
explanation than provided in the manuals? Describe
your dilemma in an e-mail to the MCPmag.com editors
the best questions get answered in this column and garner
the questioner with a nifty Redmond T-shirt.
When you send your questions, please include your
full first and last name, location, certifications (if
any) with your message. (If you prefer to remain anonymous,
specify this in your message, but submit the requested
information for verification purposes.)
Ntbackup backup "source" /j "job name" /f backupfile.bkf [/v:yes]
Here’s how this works: The first parameter NTBackup looks for is the type of operation to perform. In this case, we want backup. I’ll cover source in just a moment. The job name is some descriptive comment about the backup. When you review the backup logs, look for the job name you specified. If the job name has any spaces, be sure to use quotes. The backup file is the path and filename of the .BKF file. I always specify a full path and filename including the .bkf extension. Important: If the file already exists, it will be overwritten. Optionally, you can use /v which instructs NTBackup to verify the backup job.
Source can be local directory such as C:\Shared\Data or a UNC like \\File01\Users. All files and folders within the specified directory will be backed up. If the source path has spaces in the name, be sure to enclose it in quotes. You can specify multiple paths by separating each one with a comma:
Ntbackup backup D:\Shared\Data,D:\Files. /j "User Data Backup" /f G:\backups\UserData.bkf /v:yes
One drawback to the command-line backup is that you can’t use a wildcard to limit your backup like this:
Ntbackup backup D:\Shared\*.doc /j "User Data Backup" /f G:\backups\Shared.bkf
However, you can get a quick System State backup by using "SystemState" as the source:
Ntbackup backup SystemState /j "Quick System State" /f D:\MySystemState.bkf /v:yes
Using NTBackup from the command line can be very effective when you only need a few directories or a system state backed up and you don’t want to wade through the GUI.
Jeffery Hicks is an IT veteran with over 25 years of experience, much of it spent as an IT infrastructure consultant specializing in Microsoft server technologies with an emphasis in automation and efficiency. He is a multi-year recipient of the Microsoft MVP Award in Windows PowerShell. He works today as an independent author, trainer and consultant. Jeff has written for numerous online sites and print publications, is a contributing editor at Petri.com, and a frequent speaker at technology conferences and user groups.