Backing Up Data

[Previous] [Next]

The Windows 2000 Backup program provides several methods that you can use to create and execute backup jobs. When you launch Windows 2000 Backup for the first time—by clicking Start, pointing to Programs, choosing Accessories, choosing System Tools, and selecting Backup—you see the Welcome tab shown in Figure 34-2, from which you can choose a wizard to help you create a backup or restore job. To bypass the hand-holding provided by the wizard, you can also create a backup job by clicking the Backup tab in this dialog box and accessing the backup interface directly.

click to view at full size.

Figure 34-2. The Welcome tab of Windows 2000 Backup.

In addition to wizards and the GUI, you can execute Windows 2000 Backup jobs from the command line by running the executable program Ntbackup.exe with the appropriate parameters. See "Executing Jobs from the Command Line" later in this chapter for more information.

The following sections examine the various methods for creating a backup job. Regardless of the particular method you use, creating any backup job involves the following basic steps:

  • Select the drives, directories, and files you want to back up.
  • Specify the storage medium that will be the destination for the backup.
  • Configure backup options like backup type, logging, and file exclusions.
  • Specify when the backup is to occur.

Using the Windows 2000 Backup Tab

The Backup tab of the Windows 2000 Backup program (Figure 34-3) is where you select the files and directories to be backed up and choose their destination. You use a Microsoft Windows Explorer–like hierarchical display to browse local and network drives and make selections with the check boxes. You can select entire drives or individual files and directories for backup. The System State item backs up the registry and the Active Directory database on the local machine, as well as other system elements required in a disaster recovery situation. See "Backing Up the System State" later in this chapter for more information on the system state and disaster recovery.

click to view at full size.

Figure 34-3. The Backup tab of Windows 2000 Backup.

Creating Selection Scripts

Once you've selected the files and directories to back up, you can create a selection script that contains the job configuration you created. After choosing Save Selections from the Job menu, you specify a filename with a .BKS extension for the selection script and the directory where the program should create it. You can use selection scripts to create an identical backup job during a subsequent session by loading the selection script from the Job menu. When you do this, the same system elements you selected before creating the script will be selected again. You can then run the job as is or make additional selections. You can also use the script to execute the job from the Ntbackup.exe command line.

Accessing Files and Folders for Backup

To back up any files and folders, the account used to run the job must have the appropriate permissions granting access to those files and folders. A user who is a member of the local Backup Operators group or Administrators group is automatically granted permission to back up any and all files and folders on the local machine. Members of the domain Backup Operators group and Administrators group can back up all files and folders on any computer in the domain, as well as any computer in a domain with which a two-way trust relationship exists.

A user who isn't a member of any of these groups must either be the owner or have the Read, Read and Execute, Modify, or Full Control permission for each of the files and folders to be backed up. Disk quota restrictions can also limit a user's ability to back up systems.

Selecting the Storage Medium

After you specify what you want to back up, you must tell the program where to write the data. By default, Windows 2000 Backup provides the File option only in the Backup Destination field. If you've installed a tape drive or other device so that it is managed by the Removable Storage service, that device is also provided as a destination option. After you make a selection, you use the Backup Media field or the File Name field to specify a tape or disk name or the path and filename the program should use to create a backup file.

When you select a tape or other removable storage drive, the Backup Media field enables you to select it by the name that you've already created with Windows 2000 Backup or to select New Media, which enables you to specify a name for a new blank device.

Configuring Backup Options

At this point, you can click the Start Backup button to trigger the backup job using the parameters specified on the Backup tab of the Backup window, or you can further configure the job by choosing Options from the Tools menu. On the General tab of the Options dialog box, you can specify whether the program should use certain media-handling features and, most importantly, select whether the program should verify the data on the tape after completing the backup job. A verification pass compares the data that has been written to the tape or other medium with the original copy on the hard disks to ensure that the data has been written properly. Although the verification process considerably lengthens the time required to run the job, it's a good precaution to take, especially when you're working with a newly installed drive.

CAUTION
Although verifying the backup data written to any tape is a wise precaution to take, it isn't foolproof. Many times a backup job has seemed to complete successfully and has even been verified, but the data can't be restored for one reason or another. The only absolutely reliable method for ensuring that the data you've backed up has actually been written to the tape is to perform test restores.

On the Backup Type tab of the Options dialog box, you select the type of job that you want to run (either normal, incremental, differential, copy, or daily, as described in "Backup Types" earlier in this chapter). The default is to run a normal backup, which might be undesirable if you're in the midst of a backup sequence that relies on the archive attributes to determine which files the program should copy to the tape.

NOTE
You'll be prompted to specify values for the Backup options when you run a backup job by using either the Start Backup button or the Windows 2000 Backup Wizard. The settings that you specify for these options now will be the default values in the prompts generated later.

Logging Backups

On the Backup Log tab of the Options dialog box (Figure 34-4), you can specify whether the program should keep a log of the activities that occur during the job and the level of detail in the log. Since a detailed log lists every file and directory copied during the job, the file can be quite long. If you want to review the job only to see that all of the procedures completed successfully, you can select the Summary option.

Figure 34-4. The Backup Log tab of the Options dialog box.

The backup logs are stored as ASCII files with a .LOG extension in a subfolder named Local Settings\Application Data\Microsoft\Windows NT\NTBackup\Data. This path is located in the Documents And Settings folder named for the user logged on while the backup is performed. You can view the logs with any text editor, but unfortunately, Windows 2000 Backup gives the files incremental names like Backup01.log and Backup02.log, making it difficult to locate the log for a particular job. To view a log by the job name, you choose Report from the Backup program's Tools menu, highlight a particular job, and click the View button or the Print button. This displays or prints the log file using Notepad.

Excluding Files

On the Exclude Files tab (Figure 34-5), you can list specific files and directories that the program should skip during the backup process. By default, the list already contains the files that you never need to back up, like the Windows 2000 memory paging file (Pagefile.sys). You can add other items to the list as needed. The advantage of using the Files Excluded For All Users list instead of simply clearing specific files on the Backup tab is that you can use wildcards to skip files located anywhere in the job. For example, you can add the file mask Backup*.wbk to the list to exclude all of Microsoft Word's automatically created document backup files, wherever they occur in the selected drives and directories.

Figure 34-5. The Exclude Files tab of the Options dialog box.

The Exclude Files tab contains two lists: one to exclude files owned by all users on the system and one to exclude only files owned by the user currently logged on. With this option, you can add the Backup*.wbk file mask to the current-user-only list and safely skip your Word document backups without disturbing anyone else's.

To add files to either list, you click the appropriate Add New button and either select a registered file type or specify a custom file mask in the Add Excluded Files dialog box (Figure 34-6). You can also specify a particular path in which the files—selected either by file type or by file mask—are to be excluded. By default, the program will exclude the files in the chosen folder and all of its subfolders, but you can limit the exclusion to the selected folder only by clearing the Applies To All Subfolders check box.

Figure 34-6. The Add Excluded Files dialog box.

Running a Job

After you have configured the options for the job, you start it by clicking the Start Backup button on the Backup tab, which displays the Backup Job Information dialog box shown in Figure 34-7. The program prompts you to specify a descriptive name for the backup set and to decide whether the job should be appended to the selected tape (or other medium) or whether to overwrite any existing data. If you intend to overwrite the tape, you must specify a new name for it. If you choose to overwrite the tape, you can also control access to the data written to the tape by selecting a check box that permits only the owner of the job and members of the Administrators group to restore its files.

click to view at full size.

Figure 34-7. The Backup Job Information dialog box.

When you click the Advanced button in the Backup Job Information dialog box, the program prompts you for a backup type (with the value selected on the Backup Type tab of the Options dialog box as the default), and you must decide whether to enable the following options:

  • Back Up Data That Is In Remote Storage When selected, causes the program to back up the placeholder files referencing data that has been migrated to remote storage.
  • Verify Data After Backup When selected, causes the program to compare the data written to the tape with the original data. The default value is taken from the equivalent item on the General tab of the Options dialog box.
  • If Possible, Compress The Backup Data To Save Space When selected, activates the data compression capabilities built into the selected tape drive or other device. Windows 2000 Backup doesn't include any software-based compression capabilities; it facilitates only the use of your storage device's hardware-based compression. This option is enabled by default if the selected device has hardware-based compression capabilities and disabled if it doesn't.
  • Automatically Backup System Protected Files With The System State This option is enabled only if the System State object has been selected for backup. When this option is selected, all of the system files in the %SysDir% folder and any subfolders are backed up in addition to the files normally backed up for a system state backup.

Scheduling a Job

At this point, you can start the backup job immediately by clicking the Start Backup button in the Backup Job Information dialog box, but to establish an organized backup strategy, you'll want to schedule your jobs to execute at specific intervals. When you click the Schedule button in the Backup Job Information dialog box, if the backup selections have not been saved, you will be instructed to do so before you can schedule a backup. Otherwise, the program prompts you to specify the user name and password for the account that the system should use when running the job. The program then calls for you to specify a name for the job and displays the current date and time for the start date. To execute the job later, click the Properties button to display the Schedule Job dialog box shown in Figure 34-8.

click to view at full size.

Figure 34-8. The Schedule Job dialog box.

Here you can specify whether the job is to be executed once at a certain time or repeated at regular intervals. The options available in the Schedule Task selector are as follows:

  • Once Executes the job once at a specific time on a specific date.
  • Daily Executes the job at the specified time each day or, if you modify the value of the Schedule Task Daily selector, each specified number of days.
  • Weekly Executes the job at the specified time on each of the specified days of the week or, if you modify the value of the Schedule Task Weekly selector, each specified number of weeks.
  • Monthly Executes the job at the specified time once a month, based on either a selected date (such as the first of every month) or a day of the week (such as the first Monday of every month). By clicking the Select Months button, you can specify the months in which the job should run.
  • At System Startup Executes the job the next time the system is started.
  • At Logon Executes the job the next time the job owner logs on.
  • When Idle Executes the job when the system has been idle for a specified number of minutes.

NOTE
The scheduling capabilities of Windows 2000 Backup are quite comprehensive but not always intuitive. For example, you must select Weekly to run a daily job only on weekdays, and then select all of the days except Saturday and Sunday.

If you select the Show Multiple Schedules box, the heading on the Schedule tab changes to a selector in which you can create and manage separate schedules for the same job. You can, for example, schedule a normal backup job to execute every weekday and create a separate event to execute the same job on the last Sunday of each month, to create an extra copy for off-site storage.

If you select Once, Daily, Weekly, or Monthly from the Schedule Task list, the Advanced button becomes active. Clicking this button opens the Advanced Schedule Options dialog box. In this dialog box, you can specify a date at which a repeating job should no longer be rescheduled and you can also configure a job to repeat continually after a specified interval has elapsed. You can use this feature to copy important and volatile data to a backup file every few minutes, as an extra precaution against data loss.

On the Settings tab of the Schedule Job dialog box, you can specify conditions under which the system is instructed not to run the job, such as when the computer has not been idle for a specified length of time or when it's running on battery power. You can also configure the job to terminate if it doesn't finish within a specified length of time.

Once you've scheduled a job for later execution, you will see an icon representing it in the backup program's Scheduled Jobs tab (Figure 34-9). You can modify the parameters for any scheduled job by clicking its icon to access its Scheduled Job Options dialog box.

click to view at full size.

Figure 34-9. The Scheduled Jobs tab of Windows 2000 Backup.

Using the Windows 2000 Backup Wizard

Windows 2000 Backup also includes a wizard that walks you through the process of configuring and creating a backup job. You can launch the wizard either from the Windows 2000 Backup program's Welcome tab, by double-clicking a particular calendar date on the Schedule Jobs tab, or by clicking the Add Job button on the Schedule Jobs tab. If you have already selected drives, folders, or files to back up on the Backup tab, the program offers to use those selections in the wizard when you select a date.

The prompts presented by the wizard correspond to the options available in the program's regular GUI dialog boxes, thus reminding users of the program's capabilities and preventing them from inadvertently omitting an important option.

Executing Jobs from the Command Line

In addition to creating backup jobs by using the GUI and the wizard, you can also execute jobs from the command line. In fact, when you schedule a job for later execution by using the GUI or the Backup Wizard, the program actually uses the Windows 2000 Task Scheduler to launch the job with the command-line equivalents to the options you've chosen. When you open the Scheduled Tasks application in Control Panel and then double-click the name of the saved backup job, you can see the command line for your job in the Run field on the dialog box's Task tab (Figure 34-10).

click to view at full size.

Figure 34-10. The Task tab of the Job One dialog box.

The executable file for the Windows 2000 Backup program is still called Ntbackup.exe and is located in the \%SysDir%\System32 folder. The best application for this command-line capability is to execute selection scripts that you've previously created in the backup program's GUI interface from batch files or other scripts. The syntax for running Ntbackup.exe from the command line is as follows:

Ntbackup backup [systemstate] bksfilename|foldername /J "jobname" [/P "poolname"] [/G "guidname"] [/T "tapename"] [/N "medianame"] [/F "backupfilename"] [/D "setdescription"] [/DS "servername"] [/IS "servername"] [/A] [/V:{yes|no}] [/R:{yes|no}] [/L:{f|s|n}] [/M backuptype] [/RS:{yes|no}] [/HC:{on|off}]

  • backup Specifies that the program will be performing a backup operation (even though restore is not a valid parameter on the command line).
  • systemstate Specifies that the program should back up the system state in addition to the files and folders specified on the local computer's command line or in a selection script.
  • bksfilename|foldername Specifies the name of a selection script file or the name of a folder that the program will back up (along with its subfolders).
  • /J "jobname" Specifies a name for the backup job that the program will use to identify it in the log file.
  • /P "poolname" Specifies the name of the media pool from which the program should take the tape (or other medium) to perform the backup. This option must not be used with the /A, /G, /F, or /T switch.
  • /G "guidname" Specifies that the program perform the backup to a tape or other medium identified by the guidname variable. This option cannot be used with the /P switch.
  • /T "tapename" Specifies that the program perform the backup to a tape or other medium identified by the tapename variable. This option cannot be used with the /P switch.
  • /N "medianame" Specifies the new name for a tape or other medium that is being overwritten by the backup job. This option cannot be used with the /A switch.
  • /F "backupfilename" Specifies the name of the .BKF file to which the program should back up the selected files and folders. This option cannot be used with the /P, /G, or /T switch.
  • /D "setdescription" Specifies a descriptive label to be assigned to the backup set.
  • /DS "servername" Causes the program to back up the directory service file for a specified Microsoft Exchange server.
  • /IS "servername" Causes the program to back up the information store file for a specified Microsoft Exchange server.
  • /A Causes the program to append the backup job to the tape or other medium specified by the /G or /T switch. This option cannot be used with the /P switch.
  • /V:{yes|no} Specifies whether or not the program should verify the data after the backup is completed.
  • /R:{yes|no} Specifies whether or not access to data on the tape or other medium should be restricted to the owner of the job and members of the Administrators group.
  • /L:{f|s|n} Specifies the type of log that the program should keep while executing the backup job, where f = full, s = summary, and n = none.
  • /M backuptype Specifies the type of backup to be performed, where backuptype is replaced by one of the following values: normal, incremental, differential, copy, or daily.
  • /RS:{yes|no} Specifies whether or not the program should back up the Removable Storage database.
  • /HC:{on|off} Specifies whether or not the program should activate the hardware compression capabilities of the tape drive.

The default states of the /V, /R, /L, /M, /RS, and /HC switches correspond to the current settings of the corresponding options in the backup program's GUI dialog boxes.



Microsoft Windows 2000 Server Administrator's Companion, Vol. 1
Microsoft Windows 2000 Server Administrators Companion (IT-Administrators Companion)
ISBN: 1572318198
EAN: 2147483647
Year: 2000
Pages: 366

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net