Total Pageviews

Saturday, August 9, 2014

odsee 11g BACK-UP AND RESTORE steps


Here we have two types of back-up?

Binary back-up and ldif-backup

Binary back-up: Binary back-up will take the backup of the data like root-suffix, sub-suffix

Ldif-backup: it will take the backup of configuration including the data as well.

How to backup and restore instance?

To take the full backup of the instance we use the following command

./dsconf backup –h localhost –p 5000 /opt/sun/ldap/ins4 (this means we have taken full-back-up of port-number 5000 and saved it as ins4)

To restore the instance we use the following command

./dsconf restore-h localhost-p 5000 /opt/sun/ldap/ins4 (this means we are restoring the back-up which we have taken)

NOTE: we can back-up an instance but have to restore in the same instance, we cannot restore the instance (back-Up) in a different instance.

How to import a root-suffix?

How to export and import a root-suffix?

./dsconf export –h localhost or IP-ADDRESS –p port-number dc=example, dc=com /opt/sun/ldap/test.ldif

Now test.ldif-file is saved in /opt/sun/ldap/test.ldif, I will import it to one of the instances as follows
 
 
How to export a sub-suffix?
Ldapsearch –h localhost –p port-number or IP-ADDRESS –p port-number –D “cn=Directory Manager” –w password –b dc=gm,dc=com ou=people > /opt/sun/ldap/people.ldif
Here we are exporting ou=people to a customized location (opt/sun/ldap/people.ldif)
How to export an individual entry?
ldapsearch -h localhost -p 52389 -D "cn=Directory Manager" -w password ou=people
dc=gm,dc=com uid=xxxxxx > /opt/sun/ldap/xxxxxx.1
 
Restoring:
 
ldapmofiy –h localhost –p 11100 –D “cn=Directory Manger” –f /opt/sun/ldap/cz7n6nbackup.ldif
 
Here we are exporting uid=xxxxxx to a customized location to /opt/sun/ldap/xxxxxx.ldif
 
 

./dsconf import –h localhost or IP-ADDRESS –p portnumber /opt/sun/ldap/test.ldif dc=example,dc=com

Here we have to create root-suffix (dc=example,dc=com) prior importing it to one of the instances.

No comments:

Post a Comment