OUD Backup Script

Here is the output :


OUD Script Log Purge:: Purging the OUD Backup Script Logs older than 7 days
OUD Backup Purge:: Purging the OUD LDIF Backup older than 7 days
OUD Backup Purge:: Purging the OUD Binary Backup older than 7 days
OUD Backup:: Script Start -- 20160526_0854
Export task 20160526085425844 scheduled to start immediately
[26/May/2016:08:54:25 +0000] severity="NOTICE" msgCount=0 msgID=9896349 message="Export task 20160526085425844 started execution"
[26/May/2016:08:54:25 +0000] severity="INFORMATION" msgCount=1 msgID=10487422 message="Exporting to /tmp/oud-bkup/ldif/20160526_085421.ldif"
[26/May/2016:08:54:25 +0000] severity="INFORMATION" msgCount=2 msgID=8388850 message="The export will be done in Entry ID Order"
[26/May/2016:08:54:25 +0000] severity="NOTICE" msgCount=3 msgID=8847447 message="Exported 22 entries and skipped 0 in 0 seconds (average rate 1466.7/sec)"
[26/May/2016:08:54:25 +0000] severity="NOTICE" msgCount=4 msgID=9896350 message="Export task 20160526085425844 finished execution"
Export task 20160526085425844 has been successfully completed
+---  OUD LDIF Backup Verification:: Listing the backup ----+
-----
20160526_085421.ldif
-----
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944792 msg=Starting backup for backend virtualAcis
[26/May/2016:08:54:33 +0000] category=JEB severity=NOTICE msgID=8847446 msg=Archived: 00000000.jdb
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944792 msg=Starting backup for backend tasks
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944792 msg=Starting backup for backend schema
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944792 msg=Starting backup for backend userRoot
[26/May/2016:08:54:33 +0000] category=JEB severity=NOTICE msgID=8847446 msg=Archived: 00000000.jdb
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944792 msg=Starting backup for backend replicationChanges
[26/May/2016:08:54:33 +0000] category=JEB severity=NOTICE msgID=8847446 msg=Archived: 00000000.jdb
[26/May/2016:08:54:33 +0000] category=TOOLS severity=NOTICE msgID=10944795 msg=The backup process completed successfully
+--- OUD Binary Backup Verification:: Listing the backup ----+
-----
20160526_085421
-----
OUD Backup :: Script End -- 20160526_0854
Elapsed Time ::  00h:00m:12s

Advertisements

OUD – Sample Ldif Script


#!/bin/ksh 

source ~/oudr2ps3.env
set -x 
 
V1=V$RANDOM 
V2=new-$V1 

ldapmodify  -h localhost -p 1389 -D "cn=directory manager" -w Welcome1 <<!
dn: cn=u0,dc=example,dc=com
changetype: modify
replace: displayName
displayName: $V1
!
 
ldapmodify   -h localhost -p 1389 -D "cn=directory manager" -w Welcome1 <<!
dn: cn=u0,dc=example,dc=com
changetype:modify
delete: displayName
displayName: $V1
-
add: displayName
displayname: $V2
!

 
sleep 2 

ldapsearch -h localhost -p 1389 -D "cn=directory manager" -w Welcome1 -b "cn=u0,dc=example,dc=com" objectclass=*  displayName 

ldapsearch -h localhost -p 1389 -D "cn=directory manager" -w Welcome1 -b "cn=u0,dc=example,dc=com" objectclass=*  displayName 

sleep 2 

ldapsearch -h localhost -p 1389 -D "cn=directory manager" -w Welcome1 -b "cn=u0,dc=example,dc=com" objectclass=*  displayName