Online backup and restore limitation

When you change the original backup location, you might encounter an error. Follow the steps to work around this limitation with the online backup and restore feature.

During online backup and restore, suppose that the folder name (backup location) to which online backup was initially configured is changed for the subsequent backups. It is observed that no error is thrown during the backup operation (idsdbback), but during the restore operation (idsdbrestore) the following error messages might be displayed:
...
GLPCTL101I Restoring backup database rdsdb to configured database rdsdb.
GLPCTL103E Failed to restore backup database rdsdb to configured database rdsdb.
GLPDBR004E Failed to restore directory server instance 'sdsadmin'.
GLPDBR028W The program did not complete successfully. View earlier error messages 
 for information about the exact error.
...
Reason

As per the idsdbback and idsdbrestore (also available as dbback and dbrestore) design for online backup, the first-time backup must be a complete offline backup while the ibmslapd process is in stopped state. After the first offline backup, the online backup feature can be used while the ibmslapd process is running.

During the first offline backup, the idsdbback command takes the following options:
idsdbback -I instance_name -k /path/backupfolder1 -u [-a /path/logarchivefolder]
If the optional path for logarchive folder is not provided, the command uses a folder inside the backupfolder1 folder (as per the example) to configure the logarchivefolder and sets this value in the corresponding DB2® database configuration parameter, LOGARCHMETH1.

If the backup folder is changed for a subsequent online backup, idsdbrestore fails if the previous backup folder does not exist, since the LOGARCHMETH1 still points to the previously configured value.

Confirming the problem
To confirm, verify the LOGARCHMETH1 variable for the corresponding database configuration.
su - instance_name
db2 list db directory
db2 get db configuration for databasename | grep -i LOGARCHMETH1
Note: Replace the instance_name and databasename with the appropriate names.
Resolving the problem
If you want to change the backup location after the first offline backup, or even after subsequent online backups, complete the following procedure to update the backup folder and logarchive folder values:
  1. Stop the ibmslapd process.
    ibmslapd -I instance_name -k
  2. Use the idsbackup command to update both the backup folder and logarchive folder.
    idsdbback -I instance_name -k /path/backupfolder2 \
    -a /path/backupfolder2/INACTIVE_LOGS -u -n
  3. Start the ibmslapd process.
    ibmslapd -I instance_name -n -t