Backing Up and Restoring the Registry

By now it should be pretty clear how important the Registry is and that it should be protected. I'll go so far as to say that part of every backup and recovery plan should include the Registry. Backing up and restoring the Registry isn't done from within Registry Editor, however. It is handled through the Windows Backup utility or through your preferred third-party backup software. Either way, you have an effective means to minimize downtime and ensure that the system can be recovered if the Registry becomes corrupted.

Choosing a Backup Method for the Registry

You can make a backup of the entire Registry very easily at the command line. Simply type regedit /e SaveFile, where SaveFile is the complete file path to the save location for the Registry data. Following this, you could save a copy of the Registry to C:BackupsRegdata.reg by typing regedit /e c:ackups egdata.reg. You would then have a complete backup of the Registry.

You can also easily make backups of individual root keys. To do this, you use REG SAVE. Type reg save followed by the abbreviated name of the root key you want to save and the file name to use. For example, you could type reg save hkcu c:ackupshkcu.hiv to save HKEY_ CURRENT_USER to a file in the C:Backups directory. Again, although you can save the logical root keys (HKCC, HKCR, HKCU) in this manner, you can save only subkeys of HKLM and HKU using this technique.

Okay, so now you have your fast and easy backups of Registry data. What you do not have, however, is a sure way to recover a system in the event the Registry becomes corrupted and the system cannot be booted. Partly this is because you have no way to boot the system to get at the Registry data.

In Windows NT, you created an Emergency Repair Disk (ERD) to help you recover the Registry and get a system to a bootable state. The ERD contained system data as well as Registry data that could be used to recover and boot a system. Some of this data was stored on a floppy disk and some of it was written to the %SystemRoot%Repair directory.

In Windows Server 2003, Microsoft replaces the ERD with Automated System Recovery (ASR). ASR data includes essential system files, partition boot sector information, the startup environment, and Registry data. When you complete installation of a Windows Server 2003 system, basic recovery information is saved in %SystemRoot%Repair. This basic data include a copy of the local SAM database and other essential system files but don't include a full backup of the Registry. At first opportunity, you should create a complete ASR backup. Whenever you apply a service pack or change device drivers, you should perform an ASR backup as well.

You can create ASR backups using the Backup utility provided with the operating system. When you do this, the recovery data is stored in two locations. The primary data is stored on the backup medium you choose, such as a tape backup device or hard disk drive. Additional information needed to boot the system and access the primary data is stored on a floppy disk.

By using the Windows Backup utility, you can also back up the entire system state. Although the system state data includes a copy of the system's Registry, this type of backup isn't used in the same way as an ASR backup. Normally, you back up the system state when you perform a normal (full) backup of the rest of the data on the system.

For systems that aren't domain controllers, the system state data includes essential boot files, key system files, and the COM+ class registration database as well as the Registry data. For domain controllers, the Active Directory database and System Volume (Sysvol) files are included as well. Thus, if you are performing a full recovery of a server rather than a repair, you use the complete system backup as well as system state data to recover the server completely. Performing full system backups is discussed in Chapter 41.

Creating Registry Backups

You create Registry backups by using the Backup utility. You can start Backup by typing ntbackup at the command line or in the Run dialog box or by clicking Start, pointing to Programs or All Programs, and selecting Accessories, System Tools, Backup. By default, Backup starts in wizard mode. To change this behavior, clear Always Start In Wizard Mode, and then click Advanced Mode. This takes you to the main Backup interface, as shown in the following screen:

image with no caption

If you want to back up the Registry data along with the system state, select the Backup tab, then select the System State option, as shown in the following screen. You can then configure the rest of the backup as you would any other backup. This includes selecting the other data you want to back up, specifying the backup medium to use, and clicking Start Backup to begin the backup process—all of which is discussed in detail in Chapter 41. When you back up the system state, a backup copy of the Registry is also created in the %SystemRoot% Repair directory.

image with no caption

To make a backup for ASR, follow these steps:

  1. Start the Backup utility in Advanced Mode, then click the Automated System Recovery Wizard button in the Welcome tab. This starts the Automated System Recovery Preparation Wizard, as shown in the following screen:

    image with no caption
  2. Click Next. Select a medium type for the primary ASR data, such as File, and then type the path to the backup medium or file to use.

  3. Click Next, and then click Finish.

  4. After the wizard creates the backup of the system files, you will be prompted to insert a floppy disk. The floppy disk and the primary backup data can then later be used to restore the system.

Recovering a System Using the ASR Backup

Microsoft recommends using ASR to recover a system only as a last resort. If you've tried other techniques to recover the system and haven't succeeded, use ASR. The ASR restoration process requires the backup medium with the primary ASR data, the ASR floppy disk, and the Windows Server 2003 distribution CD-ROM. You start the ASR recovery by booting the system off the installation CD-ROM. During the text portion of the setup, press F2. ASR then guides you through the recovery process, the exact details of which depend on the system you are recovering.

Note

ASR performs a backup or restore only of essential system information. It doesn't back up or restore other data or the disk drives on the system. To back up or restore a system and all its data fully, you must follow the backup and restore procedures discussed in Chapter 41.

Tip

Recover domain controllers using a two-step process

Domain controllers deserve special consideration during backup and recovery because they store a copy of Active Directory. Not only is additional information backed up when you save the system state, but the recovery of Active Directory requires a change in technique. For domain controllers, you must perform a two-step recovery process. First, you restore the Registry, which contains the local SAM so you can log on, and then you restore the Active Directory store.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset