Using the command line

You can perform directory server restore using the commands provided here at command line.

About this task

To display backup status, issue the following command:
idsldapsearch -h <ldaphost> -p <admin port> -D <binddn> -w <password> 
-s base -b cn=backup,cn=monitor objectclass=*
To configure backup, issue the following command:
idsldapmodify -h <ldaphost> -p <ldap port> -D <binddn> -w <password> -i backup.ldif

Where backup.ldif contains: 

dn: cn=RDBM Backup, cn=Configuration
ibm-slapdBackupAt: 2008-04-14-16:55
ibm-slapdBackupChangelog: <value to be set as either TRUE or FALSE>
ibm-slapdBackupEnabled: <value to be set as either TRUE or FALSE>
ibm-slapdBackupEvery: 6-01:17
ibm-slapdBackupLocation: <specify the required backup location>
ibm-slapdBackupOnline: <value to be set as either TRUE or FALSE>
In this example, one time as well as recurring backups is scheduled by setting the ibm-slapdBackupAt and the ibm-slapdBackupEvery attribute respectively. The attributes ibm-slapdBackupAt and the ibm-slapdBackupEvery must be set in the following format:
  • ibm-slapdBackupAt : <YYYY-MM-DD-hh:mm>
  • ibm-slapdBackupEvery: <D-hh:mm> , where 0=Sunday, 6=Saturday, and 7=Every day
Note: If backups are configured to be done online, the first backup must be performed with the directory server offline. You must not schedule an online backup before performing the first backup offline or the backup will fail.
To notify the admin server about the changes in the server configuration, issue the following command:
idsldapexop -h <ldaphost> -p <admin port> -D <binddn> -w <password> 
-op readconfig -scope subtree 'CN=RDBM BACKUP, CN=CONFIGURATION
To initiate backup of a directory server instance request remotely, issue the following command:
idsldapexop -h <ldaphost> -p <admin port> -D <binddn> -w <password>
-op backuprestore -action backup
Note: The type of backup and the backup location are determined by how the server is configured for backups. The configuration must be done before issuing the idsldapexop command.
To restore a directory server instance remotely, issue the following command:
idsldapexop -h <ldaphost> -p <ldap port> -D <binddn> -w <password> 
-op backuprestore -action restore
Note: For more information about backing up and restoring directory server instance information using ldapexop utility with the extended operations option -op backuprestore, see Command Reference.