Following command will give you the exact record count under the given dn: {ou=subscribers,dc=mycompany,dc=com}
Script is using the virtual attribute called {numsubordinates}
sh /space/opends/OpenDS-2.2.0/bin/ldapsearch -h localhost -p 389 -D cn='Directory Manager' -w mycpassword -b "ou=subscribers,dc=mycompany,dc=com" -s base "objectclass=*" numsubordinates| grep "numsubordinates:"| cut -c "18-" > /space/.subscriberCount
Note: Output will be saved under /space/.subscriberCount file.Please customize it for yourself
Showing posts with label how to get opends export. Show all posts
Showing posts with label how to get opends export. Show all posts
Wednesday, March 3, 2010
opends export scheduled to work at midnight
The following crontab entry will get the export of the given branch {ou=subscriptions,dc=mycompany,dc=com} .4444 is the admin port of ldap server.
00 00 * * * sh /space/opends/OpenDS-2.2.0/bin/export-ldif -h localhost -p 4444 -D "cn=Directory Manager" -w mypassword -X --includeBranch "ou=subscriptions,dc=mycompany,dc=com" --backendID userRoot --ldifFile /space/opendsExport.ldif &
00 00 * * * sh /space/opends/OpenDS-2.2.0/bin/export-ldif -h localhost -p 4444 -D "cn=Directory Manager" -w mypassword -X --includeBranch "ou=subscriptions,dc=mycompany,dc=com" --backendID userRoot --ldifFile /space/opendsExport.ldif &
Subscribe to:
Posts (Atom)