Programming4us
         
 
 
Windows

Backing Up and Restoring with ntbackup

10/29/2010 7:57:52 PM

The ntbackup command activates the ntbackup GUI and, unlike with all other commands covered in this chapter, you cannot select what to back up with the ntbackup command itself. You have to select that from the GUI; however, you can run the GUI once, select what files to back up, and save that to a .bks file you specify on the command line later.

As with the other tools covered in this chapter, this section is not meant to replace the help page for ntbackup. It has many other options not covered here.


In addition to selecting which files are going to be backed up, you can also select values for a number of other options:

  • Type of backup (normal, copy, differential, or daily)

  • Type of target (disk or tape)

  • Name of target (for example, f:\backupfile.bkf )

  • Append or overwrite existing backups on target

  • Logging level (verbose, summary, or none)

These options can be specified as options on the command line or in the ntbackup GUI and saved as part of a .bks file. However, since you have to run the ntbackup GUI to create an ntbackup setup, we won’t cover the command-line switches in detail. Instead, we’ll show you how to get Windows to automatically create the command you need to run.

1. Creating a Simple Backup Configuration

To create a simple backup with ntbackup, you need to create a backup options file using the ntbackup GUI, save it, then specify that options file when performing an ntbackup backup. Start the ntbackup GUI by typing ntbackup at the command prompt or by selecting Start→All Programs→Accessories→System Tools→Backup. From the Backup tab, select drives or directories to back up. Please note that you can back up the System State as well.

Next, you need to select various options about the backup. The two primary choices are the type of backup and where it will go. The available backup types are normal, copy, differential, and daily:


Normal (default)

Back up the selected files and mark them as backed up.


Copy

Back up the selected files but do not mark them as backed up.


Incremental

Back up the selected files if they have changed since the last backup and do not mark them as backed up.


Differential

Back up the selected files if they have changed since the last backup but do not mark them as backed up.


Daily

Back up only the files that were modified today.

To select something other than the normal backup type, select Tools→Options→Backup Type. While you’re in the Options dialogue box, browse the other tabs to see if you want to change any of those options as well. Click OK to close this dialogue box.

You then need to select whether or not you’re going to use disk or tape. Disk is probably the best option for a simple backup, especially if you just want to back up to a share that’s going to be backed up by another process. You then need to select a filename for the backup file. Once you’ve selected these options, select Job→Save Selections As, and save the options to a filename that you record, such as c:\mybackup.bks.

2. Executing Your Simple Backup

To run the backup you created, you’ve got three choices. The first choice is to simply click Start Backup in the ntbackup GUI. You can also run it from the command line if you’ve saved the options to a file. The following command assumes that you didn’t select any options other than which files to back up and specifies all of the important options as arguments to the ntbackup command. It backs up the files you selected and saved as c:\mybackup.bks, gives the job the name “Daily Backup,” and backs the data up to the file F:\backup.bkf.

C:\ ntbackup backup "@C:\mybackup.bks" /M Normal /J "Daily Backup" /F "F:\backup.bkf"

The next choice is to create a scheduled task with this command in it. If you’d rather let Windows figure out all the command-line switches for you, you can simply use the ntbackup wizard to create the scheduled task. Once you’ve opened ntbackup, select the Schedule Jobs tab, select a date on the calendar, and click Add Job. Select the items you want to back up in the “Items to Back Up” dialogue box. The next dialogue box asks you to select a destination directory and filename, and the next screen asks you to select a backup type. The following screen gives you some other options, including whether or not to verify the data after it’s been backed up. You can then specify whether or not this backup should append to or overwrite any backups already on the destination. Finally, you’re asked to name the job and create a schedule of when it should run. Once you’ve done that, Windows creates a scheduled task with the appropriate commands in it. The one I created during my example looks like this:
C:\WINDOWS\system32\ntbackup.exe backup "@C:\mybackup.bks" /a /d 
"Set created 3/12/2006 at 8:35 PM" /v:no /r:no /rs:no /hc:off
/m normal /j "mybackup" /l:s /f "C:\Backup.bkf"

ntbackup can also be used to back up and recover Exchange.


3. Restoring with ntbackup

You cannot restore from the command line using ntbackup. What you can do is start ntbackup and select the “Restore and Manage Media” tab. Displayed in this window is a list of backups that ntbackup knows about. You can select any of the backups in this dialogue box, and you’ll be presented with a tree of the files that are in that backup. You can then select which files you want to restore, decide whether or not to restore the files to their original location or another location of your choosing, and tell ntbackup to restore them by clicking Start Restore. You’re then given a choice to select advanced options; the restore starts when you click OK. It really doesn’t get much easier than this!

Other -----------------
- Windows Azure Service Management
- Windows Azure : Content Delivery Network
- Windows Azure Storage Services
- Windows Azure Storage Characteristics
- Microsoft Windows Vista : Using Parental Controls to Restrict Computer Usage
- Microsoft Windows Vista : Creating and Enforcing Bulletproof Passwords
- Windows 7 Customization : Taking Ownership of Your Files
- Windows 7 Customization : Stopping Delete Confirmations
- Windows 7 : Managing a User Account - Limiting Computer Access
- Windows 7 : Managing a User Account
- Windows 7 : Understanding User Accounts and Permissions
- Windows Azure : Diagnostics
- Windows Azure : Common Storage Tasks - Utilizing Concurrent Updates
- Windows Azure : Common Storage Tasks - Modeling Data
- Windows Azure : Exploring Full-Text Search (part 3)
- Windows Azure : Exploring Full-Text Search (part 2) - Building an FTS Engine on Azure
- Windows Azure : Exploring Full-Text Search (part 1) - Indexing
- Windows Azure: Building a Secure Backup System (part 6) - Uploading Efficiently Using Blocks
- Windows Azure: Building a Secure Backup System (part 5)
- Windows Azure: Building a Secure Backup System (part 4)
 
 
Most View
- Sizing Considerations for mySAP Components (part 2) - Sizing mySAP Business Intelligence & Sizing mySAP SRM
- SQL Server 2008: Security and User Administration - Managing Principals (part 2) - Roles
- Windows 7: Troubleshooting Networking - Troubleshooting the NIC
- Windows Server 2008 : Using nslookup - Verifying Records with nslookup
- Security in Cloud Computing (part 3)
- jQuery 1.3 : Sorting and paging (part 1) - Server-side sorting
- Exchange Server 2003 : Configuring Interoperability with Other SMTP Messaging Systems
- Text Tags and a Little CSS3 - Adding Style to Text with CSS3 (part 1) - Styling HTML5 elements with CSS3 properties
- SQL Server 2008 : Database Mail - Related Views and Procedures
- Examples of SharePoint Administrative Tasks (part 3) - Using Windows PowerShell During the Upgrade Process
Top 10
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 3) - Configuring Recipient Filtering
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 2)
- Implementing Edge Services for an Exchange Server 2007 Environment : Utilizing the Basic Sender and Recipient Connection Filters (part 1)
- Implementing Edge Services for an Exchange Server 2007 Environment : Installing and Configuring the Edge Transport Server Components
- What's New in SharePoint 2013 (part 7) - BCS
- What's New in SharePoint 2013 (part 6) - SEARCH
- What's New in SharePoint 2013 (part 6) - WEB CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 5) - ENTERPRISE CONTENT MANAGEMENT
- What's New in SharePoint 2013 (part 4) - WORKFLOWS
- What's New in SharePoint 2013 (part 3) - REMOTE EVENTS