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 


September 2002

Repairing and Recovering AD

Techniques and tools for repairing and recovering Win2K's most crucial service
RSS
Subscribe to Windows IT Pro | See More Active Directory (AD) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Editor's Note: Portions of this article were excerpted from Sean Daily's The Definitive Guide to Active Directory Troubleshooting (Realtimepublishers.com, 2001).

In "Practice Proactive AD Maintenance," August 2002, InstantDoc ID 25637, I looked at some Active Directory (AD) maintenance and disaster-prevention activities that you should regularly undertake. Now let's take a look at a topic you need to know about when everything else fails: AD repair and recovery.

Repairing AD with Ntdsutil
If you suspect—because of error messages, log entries, or application errors—that the AD replica on a domain controller (DC) is corrupted, you might consider using the Ntdsutil utility's Repair feature to repair the damage. However, I recommend that you use this method only as a last resort. If a valid backup is available, restoring the database, which I discuss later, should be your first course of action.

Repairing the directory database doesn't always achieve successful results. For example, if a database file is corrupted, using the Ntdsutil Repair feature might not restore all objects and attributes. In fact, in some cases, using the Repair feature could cause further data loss. Isolating a DC from the rest of the network before you attempt this kind of repair can prevent additional corruption to other DCs' AD replicas. After you ensure that all is well, you can reattach the DC to the network.

Figure 1, page 54, shows how to use Ntdsutil to repair the AD database. To perform a repair operation on the AD database file, follow these steps:

  1. Go to the command prompt window, type
  2. ntdsutil

    and press Enter.

  3. At the Ntdsutil prompt, type
  4. files

    The utility will display the File Maintenance category.

  5. At the File Maintenance prompt, type
  6. repair

Restoring AD
When all else fails, you might find that restoring functionality to a Windows 2000 DC (or the entire AD network) requires that you restore AD from backup. Although the process of physically restoring the AD database on a Win2K DC from a backup isn't a logistically complex procedure, you need to consider some important logical and architectural factors before you perform any type of AD restore operation. On networks that have more than one Win2K DC, AD doesn't exist in only one location—an important factor to consider because it relates to the AD restore process. Ask yourself the following questions:

  • Is only the local DC's copy of AD corrupted or damaged, or are other replicas on other DCs also in the same state?
  • Is the data I'm restoring the definitive copy I should use to overwrite all other copies of AD object data? If so, do I risk losing changes or structural modifications (e.g., added or deleted organizational units—OUs, modifications to user or computer objects) by restoring this copy of AD as a master copy?
  • Should I restore AD on a local DC only to regain functionality on that DC (i.e., is the corruption, damage, or other type of problem isolated to the local copy of AD on that computer), which should then receive updates from other DCs that use AD replication to bring its data store up-to-date?

Answering these questions will help you determine which AD restore modes—nonauthoritative or authoritative—to use. (To read more about recovering AD, see the sidebar "AD Recovery Resources.")

Nonauthoritative restore. Most restore operations use the nonauthoritative restore mode. You typically perform a nonauthoritative restore when the problem is limited to the local Win2K DC and you believe that the AD replicas housed on other Win2K DCs are valid. During a nonauthoritative restore, any data that you restore (including AD objects) will retain its original update sequence number (USN). AD replication then uses this number to detect and propagate any changes to other DCs in the same domain.

Authoritative restore. Perform an authoritative restore when the other Win2K DCs contain invalid replicas or undesirable data. In this case, you manually designate the copy of the AD database that you want to restore. Designate only the local DC as authoritative (i.e., the master copy from which all other DCs seed their AD replicas). Authoritative restores modify the AD objects' USNs so that each object's USN is higher than those of any other AD database replicas; as a result, all the restored objects will be replicated to the other DCs' AD replicas.

You can use backup data from one DC to restore to only the same DC; you can't use a backup of one DC to restore another machine. However, if the DC system fails, you can restore the backup data to another computer that replaces the original DC. Keep this restriction in mind when you develop your backup strategy. To completely back up your environment, you need a backup of every DC in the network. In addition, you need to frequently back up the first DC that you installed in the forest root domain. This DC typically hosts unique forestwide roles and contains unique data essential to network operation.

If you're using Win2K's backup utility (ntbackup.exe) to perform a restore, you must meet the following additional conditions to successfully restore the system state (including AD). If you don't meet all these conditions, the restore operation will fail.

  • The server name must be identical to the backed-up server's name.
  • The drive letter on which the \%systemroot% folder resides must be the same letter it was when you performed the backup.
  • The \%systemroot% folder must be in the same location as it was when you originally backed it up (e.g., in the C:\winnt directory).
   Previous  [1]  2  3  Next 


Reader Comments
<P>Sean Daily's article "Repairing and Recovering AD" (September 2002, InstantDoc ID 25957) was good. Not enough articles are written about this topic, and much of the writing focuses on the fun stuff, such as new features, rather than the nuts and bolts of making the technology work. We just went through a disaster-recovery exercise and did most of the things that Daily mentioned in his article. I wish we had had the article before we started. <P>

<P>Even with Microsoft's support, we weren't able to fully restore an Active Directory (AD) server if the NICs were different than that of the server we restored to. Restoring to the same server or an identical server was a snap and followed the steps outlined in your article. But in a disaster, you usually wouldn't restore to identical hardware.</P>

<P>I restored from one server to a newer model that had different NICs. I almost had the machine running. One glitch was that I could set the Ethernet address and netmask, but when I opened the dialog box a second time, the system was set to DHCP. I changed the address and closed the box, and the address would remain changed until I rebooted the server. Rebooting reset the address again.</P>

<P>I tried restoring at home on another system and found that if the NIC cards aren't the same, the registry isn't updated and confusion results. I worked with a super Microsoft support person who concluded that no one is exactly sure what registry keys are affected when you do a system state restore. I would be interested to know whether someone has done a system state restore of an AD server from one vendor's server to another vendor's server. Did we just miss something, or is restoring Windows servers to dissimilar hardware a problem? </P>

Edward Cheadle October 30, 2002


<P><i>Thanks for sharing your experiences. I, too, have run into some of the problems you mentioned regarding system state restores, and I've also found the Microsoft documentation about this topic to be insufficient. Restoring to different hardware is always tricky, particularly with domain controllers (DCs). You might find the following Microsoft articles helpful: "How to Move a Windows 2000 Installation to Different Hardware" (http://support.microsoft
.com/default.aspx?scid=kb;en-us;q249694), "How to Move a Windows XP Installation to Different Hardware" (http://
support.microsoft.com/default
.aspx?scid=kb;en-us;q314070), and "How to Restore a Backup to a Computer with Differ-
ent Hardware" (http://support
.microsoft.com/default.aspx?
scid=kb;en-us;q139822). I also addressed the hardware problem in "Recover Crucial Data from a Win2K Server" (June 2002, InstantDoc ID 24813). And Paula Sharick compiled tips in "A Disaster-Recovery Reference List," (http://www
.winnetmag.com, InstantDoc ID 22517). </I></P>

Sean Daily October 30, 2002


You must log on before posting a comment.

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




Top Viewed ArticlesView all articles
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. ...

How can I stop and start services from the command line?

...


Active Directory (AD) Whitepapers Sustainable Compliance: How to reconnect compliance, security and business goals

Managing Unix/Linux with Microsoft System Center Operations Manager 2007 Cross Platform Extensions Beta

Addressing the Insider Threat with NetIQ Security and Administration Solutions

Related Events Storage Consolidation for Your Microsoft Applications: Reducing Cost and Complexity

Virtualization, Automation and Databases

Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Check out our list of Free Email Newsletters!

Storage eBooks A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Windows 2003: Active Directory Administration Essentials

Related Active Directory (AD) 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