Active Directory Backup and Restore

Offline defragmentation of active directory database

On CCNA.education.in open command prompt as administrator. Stop the active directory domain services by running net stop ntds command.

C:\>net stop ntds

Type y to confirm

When the active directory domain service finish shutting down enter the ntdsutil command.

C:\>ntdsutil

Ntdsutil: activate instance ntds

Ntdsutil: files

File maintenance: info

File maintenance: compact 2 c:\temp

File maintenance: integrity

After The defragmentation is completed start the active directory domain services service.

C:\>net start ntds

Creating active directory snapshot

Open CCNA.education.in open command prompt with administrator privileges. Type the following command to create active directory snapshot.

C:\>ntdsutil

Snapshot: activate instance ntds

Snapshot: create

Snapshot: quit

Ntdsutil: quit

Mounting active directory snapshot

In order to view the object of the snapshot you should Mount the active directory  snapshot. Type the following command to Mount active directory snapshot.

C:\>ntdsutil

Ntdsutil: snapshot

Snapshot: activate instance ntds

Snapshot: list all

Snapshot: mount (copy and paste above code)

Snapshot: quit

Ntdsutil: quit

Now using dsamain told to assign ldap port active directory snapshot.

C:\>dsamain /dbpath c:$201707200227_VOLUMEC$\Windows\NTDS\ntds.dit/ ldapport 5000

After mounting the snapshot you can use tools to connect to and explore the snapshot. active directory users and computers is one of the tools that you can use to connect to the instance.

Now open active directory users and computers right-click education.in in and select change domain controller

In change directory server type CCNA: 5000 then click ok

Unmounting and  AD DS snapshot

To unmount the active directory snapshot perform the following procedure

C:\>ntdsutil

Ntdsutil: snapshot

Snapshot: activate instance ntds

Snapshot: list all

Snapshot: unmount (copy and paste above code)

Snapshot: quit

Ntdsutil: quit

Recover deleted object from tomb stone

From account OU, incidentally an object name a1 is deleted.

To recover deleted object you can use ldap tool

Topan edp.exe lekin start and in the start search textbox type ldp and press control shift

 Open the ldp.exe administrator..rdp console click connection then click on connect

Inconnect type in the domain controller IP address and press ok

In ldp console click connection play icon bind

In bind select bind as currently logged on user and click on ok

In ldp play options and click on controls

In controls select return deleted object on the load predefined and click on ok

Ldp console click on view then click on tree

In tree view click on ok

Ine ldp console expand DC is equal to do CCNA DC is equal to com expand CN is equal to deleted objects DC is equal to CCNA DC is equal to come right click deleted user listed in deleted objects and click on modify

Now the modify dialogue box appear on the screen in edit entry attribute type is deleted and Nanda operation select delete and press enter

In edit entry attribute enter the distinguish name and in values sections type the original distinguish name also known as DN this active directory object. In our case CN is equal to a1 OU is equal to account DC is equal to CCNA this is equal to com. Under operation select replace and after that press enter

In modify check the extended box and click run

In modify click close and also close the ldp console

After the deleted user is recover reset the password from Active Directory Users and Computers.

After resetting the password enable the user account

Leave a Reply

Your email address will not be published. Required fields are marked *