how to get copiedFrom generationID last_change number for Netscape Directory Server 4.x
---------------------------------------------------------------------------------------
[http@baghdadic slapd-replicator]$ pwd
/servers/netscape/directory4/slapd-replicator
[http@baghdadic slapd-replicator]$ find . -name "*" -exec grep -i copiedfrom {} \; -print
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1870627
./db/id2entry.db2
...
OR:
[http@baghdadic slapd-directory]$ pwd
/servers/netscape/directory4/slapd-directory
[http@baghdadic slapd-directory]$ find . -name "*" -exec grep 020040311063301 {} \; -print
generation: 020040311063301
./db/id2entry.db2
[root@eclectic data]# /servers/sun/directory52/shared/bin/ldapsearch -h directory -p 389 -D "cn=Directory Manager" -j /servers/local/directory/data/passwd-prod -b "cn=ldap://:389,dc=directory,dc=unimacq,dc=edu,dc=au" -s base "objectclass=*"
version: 1
dn: cn=ldap://:389,dc=directory,dc=unimacq,dc=edu,dc=au
cn: ldap://:389
objectclass: top
objectclass: applicationprocess
objectclass: ldapserver
generation: 020040311063301
[root@eclectic data]# /servers/sun/directory52/shared/bin/ldapsearch -h directory -p 389 -D "cn=Directory Manager" -j /servers/local/directory/data/passwd-prod -b "changenumber=1870627,cn=changelog" "objectclass=*"
version: 1
dn: changenumber=1870627,cn=changelog
objectclass: top
objectclass: changelogentry
changenumber: 1870627
targetdn: ou=certificate authority,o=the university of macquarie,c=au
changetime: 20050809194823
changetype: modify
changes:: cmVwbGFjZTogY2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDtiaW5hcnkKY2VydGlmaWN
hdGVyZXZvY2F0aW9ubGlzdDtiaW5hcnk6OiBNSUlCV1RDQnd6QU5CZ2txaGtpRzl3MEJBUVFGQUR
CVE1Rc3dDUVlEVlEKIFFHRXdKQlZURWtNQ0lHQTFVRUNoTWJWR2hsSUZWdWFYWmxjbk5wZEhrZ2I
yWWdUV1ZzWW05MWNtNWxNUjR3SEFZRFZRUUxFeFZEWlgKIEowYVdacFkyRjBaU0JCZFhSb2IzSnB
kSGtYRFRBMU1EZ3dPVEE1TkRneU0xb1hEVEExTURnd09URXdNRGd5TTFvd1B6QVRBZ0lMcngKIGN
OTURRd05ERTJNREl5T0RJMVdqQVRBZ0lMMkJjTk1EUXdOakk1TURRMU1UTXpXakFUQWdJQ3d4Y05
NREl3TlRJM01EWTBNekUxV2oKIEFOQmdrcWhraUc5dzBCQVFRRkFBT0JnUUI0aXRrZVdmb2NBYlV
SWjlUWDN6Q0Z2ajRUdHZkaTBhb2JTSjk4MC9xY0tUN0srVDJpTzkKIE1CSlZWY1ZpRTVkZzJGZHF
HOGM4dHpKT1BxRE5vYTF2VjBpMTNDRGxNRldQTisrMzVQRm9mdCtZb0RCTUNOR21TVDMzdWxWZHp
CSUUKIEpZeDZBc0J2a3JQWXN2NU13YTNad0w1YzhUcHhERktqdlQ0cGRxNDNVOGZnPT0KLQpyZXB
sYWNlOiBtb2RpZmllcnNuYW1lCm1vZGlmaWVyc25hbWU6IGNuPURpcmVjdG9yeSBNYW5hZ2VyCi0
KcmVwbGFjZTogbW9kaWZ5dGltZXN0YW1wCm1vZGlmeXRpbWVzdGFtcDogMjAwNTA4MDkwOTQ4MjN
aCi0KAA==
[root@eclectic data]# /servers/sun/directory52/shared/bin/ldapsearch -h directory -p 389 -D "cn=Directory Manager" -j /servers/local/directory/data/passwd-prod -b "changenumber=1870628,cn=changelog" "objectclass=*"
ldap_search: No such object
ldap_search: matched: cn=changelog
So you can add "copiedfrom: directory.unimacq.edu.au:389 020040311063301 1870627" attribute into "ou=Resource, o=The University of Macquarie, c=AU" entry.
Meanwhile add "o=The University of Macquarie,c=AU" on the top of the export/import ldif file:
[root@eclectic data]# /servers/sun/directory52/shared/bin/ldapsearch -h directory -p 389 -D "cn=Directory Manager" -j /servers/local/directory/data/passwd-prod -b "changenumber=1870626,cn=changelog" -s base "objectclass=*"
[root@eclectic data]# /servers/sun/directory52/shared/bin/ldapsearch -h directory -p 389 -D "cn=Directory Manager" -j /servers/local/directory/data/passwd-prod -b "o=The University of Macquarie,c=AU" -s base "objectclass=*"
version: 1
dn: o=The University of Macquarie,c=AU
objectclass: top
objectclass: organization
o: The University of Macquarie
aci: (targetattr="*")(version 3.0; acl "Configuration Adminstrator"; allow (al
l) userdn = "ldap:///uid=admin, ou=Administrators, ou=TopologyManagement, o=
NetscapeRoot"; )
aci: (target="ldap:///o=The University of Macquarie,c=AU")(targetattr="objectc
lass || o || certificaterevocationlist;binary || cacertificate;binary || use
rcertificate;binary")(version 3.0; acl "Anonymous access"; allow (compare,re
ad,search) userdn = "ldap:///anyone"; )
aci: (target="ldap:///o=The University of Macquarie,c=AU")(targetattr!="nsLIPr
efs")(version 3.0; acl "Roaming Access"; allow (all) userdnattr = "owner"; )
aci: (target="ldap:///o=The University of Macquarie,c=AU")(targetattr="departm
entnumber || employeetype")(version 3.0; acl "ARSadmin"; allow (compare,read
,search) userdn = "ldap:///uid=ARSadmin,ou=Directory Administrators, o=The U
niversity of Macquarie,c=AU"; )
aci: (target="ldap:///ou=IPReg Groups,ou=Groups,o=The University of Macquarie,
c=AU")(targetattr="*")(version 3.0; acl "IPReg access to Groups"; allow (all
) groupdn = "ldap:///cn=Groups,ou=IPReg Groups,ou=Groups,o=The University of
Macquarie,c=AU"; )
aci: (target="ldap:///o=The University of Macquarie,c=AU")(targetattr="*")(ver
sion 3.0; acl "Allow IPReg Replicator Access"; allow (compare,read,search) u
serdn = "ldap:///uid=IPRegReplicator,ou=Directory Administrators, o=The Univ
ersity of Macquarie,c=AU"; )
aci: (targetattr="userpassword")(version 3.0; acl "Allow self entry modificati
on"; allow (selfwrite,compare,write,read,search) userdn = "ldap:///self"; )
That's the way you can "Manual Consumer Creation"...
Now, try to find last change number in consumer directory.
After import the ldif data into the consumer server, "copiedfrom: directory.unimacq.edu.au:389 020040311063301 1870627" attribute will be gone (disappear).
from Netscape Directory Console: Configuration -> Replication Agreements -> Summary -> Status:
You can read:
current status: idle
last changelog number replayed: 1872196
history:
[http@baghdadic db]$ pwd
/servers/netscape/directory4/slapd-replicator/db
[http@baghdadic db]$ find . -name "*" -type f -exec grep 1872196 {} \; -print
entrychangenumber: 1872196
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
entrychangenumber: 1872196_modifiersname: cn=Directory Manager
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
./log.02807
[http@baghdadic db]$ find . -name "*" -type f -exec grep 020040311063301 {} \; -print
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
./id2entry.db2
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
./__db_log.share
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
./__db_mpool.share
./log.02808
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872193
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872193
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872194
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872194
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872195
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872195
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
...
[http@baghdadic db]$ ls -al log.02808
-rw-r----- 1 http 6702236 Aug 10 12:58 log.02808
[http@baghdadic db]$ strings log.02808 (at the end of the file)
...
numsubordinates: 29024
entrydn: ou=resources,o=the university of macquarie,c=au
modifiersname: cn=Directory Manager
modifytimestamp: 20050810025619Z
entrychangenumber: 1872196
copiedfrom: directory.unimacq.edu.au:389 020040311063301 1872196
...
Reference
=========
+ page 311 of the <<Netscape Directory Server Administrator's Guide version 4.0>>
|