[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference forty2::x500

Title:X.500 Directory Services
Notice:Sprt: FORTY2::X500_SUPPORT, Kits: 216.*, try dir/titl=OFFICIAL
Moderator:FORTY2::PULLEN
Created:Tue Jan 30 1990
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1016
Total number of notes:4299

1002.0. "Recommended X.500 V3* Backup Procedure on Digital UNIX?" by GOBUCS::COOLEY (Megan and Michelle's Daddy) Fri May 02 1997 01:19

    My customer is using X.500 for nightly directory synchs and would like
    to do a backup at the end of the nightly synch.  They're looking for a
    way to restore the DSA from the previous night if a disk failure or 
    software glitch causes the DSA files to become corrupt.
    
    What state can the DSA be in for a valid 'restorable' backup to be taken?
    (e.g. Enabled, Disabled, Deleted, or Deleted to Snapshot)
    
    What files would need to be backup up?
    (Assuming all of /var/dxd unless the DSA needs to be deleted to snaphot
     in which case the memory and update files wouldn't be needed)
    
    Regards,
    Warren
T.RTitleUserPersonal
Name
DateLines
1002.1a-105.tunnel.crl.dec.com::FORTY2::PALKAAndrew Palka Altavista DirectoryFri May 02 1997 11:2154
You can usually do a backup in any state. There is only
one time to avoid. That is when the dsa is doing a DIT check.
At this time it writes one memory image file out and then starts
using the other one. At any time at least one of the memory image
files will be valid, so if you could take an instantaneous backup
there would never be a problem. If your backup takes a while then
it is possible that it starts copying one memory image file while the
other one is valid, the DSA then switches over and the backup
proceeds with the other one when the first one is the valid one. That
way you would end up with 2 invalid memory iamge files. 

You could use the ADVFS clone feature to get an instantaneous
snapshot. However if the DSA does do a DIT check then it will
write out one of the files and you will require a lot more disk space.

If you can take the DSA down for a while then it may be better to
make the DSA create a snapshot file (ncl> delete DSA to snapshot).
You would not need to save the memory image files in that case, that
would make the backup operation quicker and easier as you may have just
a quarter of the space needed. You could restart the dsa as soon as the 
snapshot file had been created. Again, it would be best to avoid doing
this at the time a DIT check is due, as the DSA might delete the
essential update log file before you could get it onto the backup ! A
snapshot file is more portable between versions and platforms, so is
more useful.

The backup should contain the following files.

DSA-information-tree.snapid
DSA-information-tree.snapshotnnnnnnnnnnnn
DSA-information-tree.updatesnnnnnnnnnnnn

(nnnnn is the most recent one).


OR

DSA-information-tree.memory-image0
DSA-information-tree.memory-image1
DSA-information-tree.updatesnnnnnnnnnnnn

(In practice only one of the memory image files  is needed, but you
cant tell which one it is !).

You must also ensure that you have the schema files saved, however
these are not modified by the DSA so you can archive them whenever
you change them.

Note that you can control the times that the DIT check is scheduled,
via NCL commands. I think the default is 00:00 and 12:00 each day
(UTC time - so that local time will vary depending where you are).

Andrew

1002.2a-105.tunnel.crl.dec.com::FORTY2::PALKAAndrew Palka Altavista DirectoryFri May 02 1997 11:306
You may also want to save any older update logs that are present.
These may be required for incremental replication to work.
If the files are missing then the dsa will have to use total
replication.

Andrew
1002.3FORTY2::PULLENJulian PullenFri May 02 1997 17:464
See "Digital X.500 Directory Service - Problem Solving v3.0",
page 5-15

	Julian
1002.4X.500 Backup StrategyGOBUCS::COOLEYMegan and Michelle's DaddyFri May 02 1997 20:0239
    Thanks guys - I always forget about that "Problem Solving" Manual.
    I always seem to think it's for when I have a "bad" problem to solve.

    Anyway, has anyone turned the commands in Section 5.8.2 into a shell
    script that can be used in a cron job?  There seems to be alot of
    "noting" and "be confident that" which might be tricky to automate.

    Otherwise, if the DSA can be down for a bit, I take it I can just
    do this:

    	ncl disable dsa
    	ncl delete dsa

    	backup /var/dxd except DSA*snap*

    	ncl create dsa
    	ncl enable dsa

    OR

    	ncl disable dsa
        ncl delete dsa to snapshot

    	backup /var/dxd except DSA*memory-image* and DSA*updates*

    	ncl create dsa   or   ncl create dsa from snapshot
        ncl enable dsa
    
    	rm /var/dxd/DSA-*snapshot*
    
    I would only do "ncl create dsa from snapshot" once in a while, since
    it seems to take a while (This is a 250,000 entry DSA).  Maybe, I could 
    do it once a week to defragment the memory image file (since there will
    be a few thousand adds/deletes a week).

    Advice Welcome.  The goal is to have a totally automated environment.

    Regards,
    Warren
1002.5FORTY2::PULLENJulian PullenTue May 06 1997 21:485
	The update files are required by the DSA if you "delete dsa
	to snapshot file" or "delete dsa to memory image"

	Julian