This article explains how to export the entire production tree eDirectory information including user passwords to set up a test environment with the same production tree data. This will helps system administrators and eDirectory engineers to test new products, patches/bug fixes before deploying into the production environment.
Let us assume we have a NetWare server with a real copy replica(Master, R/W or R/O) of all eDirectory partitions in our tree.
- Take a eDirectory backup - Run "dsrepair -RC" or "dsrepair -RC sys:\Folder Name" on the console of a server which holds the master replicas of all partitions or r/w replicas of all partitions or couple of master replicas and remaining r/w replicas. This will create a file called "00000000t.$du" in sys:\system\dsr_DIB folder or in the folder which you specified in "dsrepair -RC sys:\Folder Name". For every 100 MB the backup file will be sliced into 00000001.$du, 00000002.$du and so on.
- Login from a Windows client workstation to the server on which we run "dsrepair -RC" and copy the entire sys:\system\dsr_DIB folder if you just run "dsrepair -RC" or copy the appropriate folder if you run "dsrepair -RC sys:\Folder Name".
- Install a single server tree in an isolated network with the name of the server on which we run "dsrepair -RC" command and also specify a temporary tree name(Example :Temp_tree). Don't forget to give a different TCP/IP address to the new server other than the IP of the server in the production from which we copied the eDirectory backup. It is highly recommended to setup the server with same OS, eDirectory versions and same patch level of the server on which we run "dsrepair -RC".
- From the Novell Client workstation which have the eDirectory backup folder copied from the production server, login to the temp tree and copy the entire backup eDirectory database folder to one of the volumes in the single server.
- eDirectory restore - Run dsrepair -$du ->Adv. Options -> NDS Archive Options -> Restore NDS without authentication, specify the full path of the eDirectory backup folder. You can exit out from dsrepair once the eDirectory restore is complete. Run "config" command on the server console and verify the tree name and context.
- Cleaning the replica rings - Since our tree is a single server tree, we have to remove all servers from every replica ring except the one we are working on. Run "dsrepair -a" ->Adv. Options -> replica and partition operations -> select the partitions one by one, remove all servers except the one we are working on by using the option "remove the server from the replica ring".
- Designating R/W replicas as Master - In-case we have R/W of couple of partitions available on the server other than Master, Run "dsrepair -a" -> Adv. Options -> replica and partition operations -> select the partitions one by one which have a R/W on the server, hit ENTER and choose the option "designate this server as the New Master replica".
- Cleaning tree - From one of the client workstations in the isolated network, login to the test server, open ConsoleOne or NetWare Administrator and remove all associated objects of all servers except the server in the our test environment.
- Network Address repair - This will remove the Network address reference of all servers which completely removed from the tree using steps six thru eight. Run "dsrepair -a" -> Adv. Options -> servers known to this database -> select the server on which we are running dsrepair-> Hit ENTER and do a "All Network address repair" two or three times. Once the process is completed it will be a good idea to run a "dsrepair -RC" command to take an eDirectory backup. care should be taken not to overwrite the backup copied from the production.
- Perform a local database repair - A local database repair at this point will remove the references of all other servers and associated objects from the eDirectory database. Run "dsrepair -a" ->Adv. Options -> Local database repair, change the option "Lock the NDS database during entire repair" to Yes, hit F10 and perform the repair till getting '0' errors or same number of errors. Once the process is completed it will be a good idea to run a "dsrepair -RC" command to take an eDirectory backup. Better specify the same folder which used in step nine.
- Rename the server - This will help us to run the server as part of production with entirely new tree name and server name. To rename the server, run "ea" on the server console, this will load AUTOEXEC.NCF file, find out the string "File server name" and specify a new server name. Reboot the server. Performing a local database repair with '0' errors and eDirectory backup using "dsrepair -RC" is highly recommended.
- Rename tree - To rename tree, run "dsmerge" from the server console, choose the option, rename tree and specify a new tree name. Reboot the server. Performing a local database repair with '0' errors and "dsrepair -RC" highly recommended.
- Reboot the server. Once the server is up and running you can see the new server name at the server console and verify the new tree name by running "config" command.
- eDirectory health check - The last and final step is perform a eDirectory health check. For that run "dsrepair -a" from the server console and select the following options.........
- -dsrepair -a,Time synchronization. If there is an error, run "Monitor" from the server console, Server Parameters, time and configure the server as a "single" time server or "Reference". Exit out from monitor and do a "unload timesync" and "load timesync".
- - Run dsrepair -a,"Report Synchronization Status" and make sure there are no errors.
- -dsrepair -a, Adv. Options, "Check external references" to make sure there are no stuck obituaries on the servers database.
- -Finally perform a "Local database repair" with '0' errors and run "dsrepair -RC" to take a final backup.
Now your test environment is ready with your production tree eDirectory data for any type of testing! At this point you can attach the server into the same production network with out any problems and also you have the freedom to add more servers into the new tree time to time.
Note: If you want to backup eDirectory from a production Linux eDirectory server and set up a test Linux eDirectory server environment with production tree data, the procedure is almost same except the command we use for eDirectory backup/restore. The best way to backup/restore eDirectory data from a Linux box is using "dsbk" since "dsrepair -rc" will not run on a Linux eDirectory box.
If you want to backup eDirectory from a Windows eDirectory server in the production and set up a test Windows eDirectory server environment, the procedure is almost same as that of NetWare. We can backup eDirectory using "dsrepair -rc" command with the help of dsrepair.dlm and the restore will be possible with "dhost.exe" from command line of the Windows box.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.