Restoring DS Backup files (all DS versions)

  • 3097330
  • 23-Oct-2006
  • 26-Apr-2012

Environment

Novell Directory Service

NDS 7.X

Situation

-723 when database loads
-168 when running Unattended Full Repair (DSREPAIR)
Database is locked and will not open
Restoring backup files (.DOD) & (NDO.01 and NDO.DB)
SEARCH: DOD OLD BACKUP DSREPAIR
DOD
NDO
Restoring DS Backup files (.DOD)

Resolution

This document was created to walk you through the process of restoring the backup database files (.DOD files). These files are created every time a successful Repair Local DS Database is run and 72 hours have passed since the last creation.

WARNING: READ THE ENTIRE DOCUMENT and USE THE BELOW INFORMATION WITH EXTREME CAUTION for THIS SITUATION ONLY. Using the below options/information in other situations can cause serious corruption in your tree.

WARNING: This CAN be done on a SINGLE SERVER TREE, however in restoring older files you will loose any information, changes, and or associations that occurred in the interim.

**With any recovery method, it must be understood that there is a potential that information and changes can and probably will be lost. We make no claims that restoring files will resolve any and all issues. If in the event that the restoration of any of these files does not result in fixing the issue, the next step is to clean up the Tree, and start fresh. In the event that the tree is a Single server Tree, this means that the customer will have to recreate the tree from scratch or follow other recovery methods such as tape backup etc.

WARNING: DOD files are SERVER specific, DO NOT COPY THEM TO OTHER SERVERS. THIS WILL CORRUPT BOTH SERVERS DATABASES AND MAY CAUSE OTHER SERIOUS, NON-RECOVERABLE PROBLEMS in your TREE!!!

This process must ONLY be used when you have tried all other possible options and still CANNOT GET YOUR EXISTING DATABASE REPAIRED AND OPENED UP. Typically you will encounter -618 errors or -723 errors. If you are receiving -723 errors, make sure you try other options listed in the below documents BEFORE restoring .DOD files.

Verify the following solutions have not resolved the issue before following the solution below:
TID #10010921 - DS Database won't open Error: -618 [no longer available] and TID #10016239 - Database won't open, Error: 723 [no longer available]

Because the backup files were created at some earlier point of time, if restored, they will be missing any updates / changes made to partitions for replicas stored on that server since that time. If we restore the database as it was, then it is possible to lose any changes made to those partitions and have inconsistent replica ring information between your servers. This process WILL REMOVE THE REPLICAS OFF THE SERVER during the restore of DS. You should have additional copies of those replicas on other servers. You need to verify that you have additional replicas on other servers BEFORE proceeding. After the process is complete you can add replicas back on this server.

If this server holds the ONLY replica of certain partitions, then you should contact Novell Support for possible other options or restore the objects from those partitions with a tape backup.


Steps:
On failed Server
1. Unload DS.NLM
2. Load NETBASIC.NLM | SHELL
3. From the NetBasic interactive shell, preform the following Actions

Look at their date of the .DOD files with 'DIR _NETWARE\?.*'. Has the Server object been moved since the date the .DOD file was created? If so, then this operation will probably not work for you. You will need to find a more recent backup of these files through DSREPAIR.DIB or tape backup. Or Uninstall NDS and reinstall NDS. If you need to remove NDS, Follow the steps in TID #10013746 - Steps to force NDS (eDirectory) off a server
If the you have not moved the Server object since the date on the .DOD files, then continue on

NetWare 5.x running DS.NLM 7.x ONLY
'COPY SYS:_NETWARE\0.DOB SYS:_NETWARE\0.DSB'
'COPY SYS:_NETWARE\0.DOD SYS:_NETWARE\0.DSD'
'COPY SYS:_NETWARE\1.DOD SYS:_NETWARE\1.DSD'
'COPY SYS:_NETWARE\2.DOD SYS:_NETWARE\2.DSD'
'COPY SYS:_NETWARE\3.DOD SYS:_NETWARE\3.DSD'

Note: Pressing the up arrow will bring up the last line so that you can edit it and not have to type all the above text.

4. EXIT the shell by typing EXIT.
5a. IF NO REPLICAS RESIDE ON THE SERVER: SET DSTRACE = *. and END the process (further steps are not necessary).
5b. IF REPLICAS RESIDE ON THE SERVER, Load DS.NLM -NDB (and continue with the rest of the steps)
6. SET DSTRACE=!D (This disables synchronization)
7. Load DSREPAIR -XK2 | Advanced options | Repair Local NDS Database | then immediately back to Advanced options. (This opens the database) | Then go into Replica and partition operations | Write down all the partitions on the server. Including Master, R/W, R/O and S/R.
8. Next in DSREPAIR -XK2, run a repair Local Database with the defaults and Rebuild Operational Schema.
9. When the repair is complete, exit out of DSRepair completely.
10. Preform the following DSTRACE commands.
SET DSTRACE=!E (This re-enables synchronization)
SET DSTRACE=+BLINK (This Allows you to see the Backlink Process)
SET DSTRACE=*B (This Starts the Backlink Process)


On another server that is in the replica ring for the partitions you wrote down above
1. Load DSREPAIR -A | Advanced options | Replica and partition operations | View each of the replica rings, one at a time | Select the server you restored the DOD/OLD files on | Remove this server from the replica ring. You will have to login and type "I Agree". If the server was a Master Replica, you will need to designate another server as the Master Replica in DSREPAIR on the RW server.

2. If you need to, go to additional servers in the ring and remove the server from the replica ring, then do so. You only need to delete it from one server in the replica ring, it will synchronize it out to the other servers in the ring if synchronization is running properly.

3. On each server you go to in the above steps, force an NDS synchronization process to execute to send out the removal of the server from the replica rings to other servers in the replica ring. (SET DSTRACE=*H)

NOTES:
1. Removing a server from a replica ring is only one piece to removing a replica. Do NOT think that if you remove the servers from a replica ring it removes the partition completely or removes the partition from the server. It DOES NOT. This option must be used in conjunction with another option that delete the replica(s) from the server such as DSREPAIR -XK2.

2. This process does not verify that all the associated stream files for the DS Database are present. This is not a problem if you pull the replicas from the server. Do NOT think that because you can see the replicas on the server that all the objects and stream files for those objects are intact. NOVELL RECOMMENDS YOU REMOVE the REPLICAS from the server, clean up the rings and then add them back. Do NOT skip those steps above. Inconsistent results can occur if you do.

3. It is possible to lose Trustee Directory assignments made between the Date of the .DOD files and the Current Date. You may want to run a Check Volume Objects and Trustees from DSREPAIR | Advanced options. Then recreate the trustee directory assignments as needed.

USE THE ABOVE INFORMATION EXACTLY AS STATED ABOVE WITH EXTREME CAUTION!!.

Additional Information


Formerly known as TID# 10020540