idsdbback, dbback

Use the dbback command to take a backup of the directory data and configuration files.

Description

The idsdbback command takes a backup of the directory data and configuration files. The administration server uses this command to process backup requests. For offline backup, the directory server must be stopped for the idsdbback command to succeed. Also, the directory server must be is stopped state when the -u parameter is used for the first time. Online backups require a change to the database configuration and an initial offline backup. Subsequent online backup operations can proceed with the directory server in running mode.

  • Specifying backup location on an NFS mounted partition and restoring from an NFS mounted partition causes the following error.
    2004-10-07-21:08:00.native retcode = -1026; state = "^A"; 
    	message = "SQL1026N The database manager is already active." 
    2004-10-07-21:08:01.native retcode = -2025; state = "^A"; 
    	message = "SQL2025N	An I/O error "6" occurred on media
    	"/dbrestore/backup/SVTINST1.0.svtinst1.NODE0000.CATN0000.20041007185"."
    The idsdbback or idsdbrestore operation must be done on a local drive or partition only.
  • The DB2® level that is used to back up database when the server is offline must be of same version that is used to restore database.
  • The idsdbback command removes the files from the previous backup after successfully completing a backup. If the -l parameter for change log data is not provided or is not configured for the instance and there are existing change log backup files, the existing change log backup files are removed.
  • The directory server instance must be stopped when the -a parameter is used to specify a new log archive directory. DB2 requires all applications to be disconnected from the database before the changes take effect. Any other applications that are connected to this database must also be disconnected. If the -a parameter is specified without the -k parameter, then the archive path is changed in the DB2 configuration but no backup is taken. The archive path gets applied to future online backups.

Synopsis

idsdbback | dbback -I instancename -k backupdir [-d debuglevel] [-b outputfile] 
                    [-q] [-n][[-l] [-u [-a archive_dir]] | [-x]] | -v | -?

Options

The idsdbback command takes the following parameters.
-a archive_dir
Specifies the directory for configuring online backup and to save inactive log files. For the first online backup, if this parameter is not specified, the value of backupdir is used. For subsequent backups, the configuration is not changed unless this parameter is specified. The -a parameter can be specified only with -u for online backups.
-b outputfile
Specifies the full path of a file to redirect console output. If you use this parameter with the -q parameter, errors are sent to the outputfile file. If debug mode is set, then the debug output is sent to this file.
-d debuglevel
Sets the LDAP debug level to debuglevel. If you specify this parameter, it sends the debug output to stdout. The debuglevel value is a bit mask that controls which output is generated with values from 1 to 65535. For more information about debug levels, see Debugging levels.
-I instancename
Specifies the directory server instance name for which you want to run the backup operation.
-k backupdir
Specifies the folder to use to back up the database.
Note: When you take multiple backups, ensure that each backup stored is in a separate directory. If you have more than one version of database backup file in the same directory, the idsdbrestore command restores only the database with the most recent timestamp.
-l
Specifies to include change log data for backup, if change log configured.
-n
Specifies to run in no prompt mode. All output from the command is generated, except for messages that require user interaction.
-q
Specifies to run in quiet mode. All output from the command is suppressed, except for error messages. If you also specify the -d parameter, then the trace output is not suppressed.
-v
Specifies to show the version information of the command.
-u
Specifies to use online backup. For the first time, it requires directory server to be offline.
-x
Specifies not to back up database files, indicating a proxy backup.
-?
Specifies to show the syntax format.

Examples

Example 1:
To take an offline backup of the database, configuration, and schema files, run the following command:
idsdbback -I instance_name -k backupdir
Example 2:
To take an online backup of server, run the following command:
idsdbback –n –I instance_name -b outputfile -u -k backupdir
Example 3:
To take an online backup with a changed archive path, issue the following command:
idsdbback -n -I instance_name -b outputfile -k backupdir –u –a archive_dir
Example 4:
To take an online backup for a directory server with change log data, run the following command:
idsdbback -I instance_name –k backupdir –u –l -n
Example 5:
To take a backup of a proxy server, run the following command:
 idsdbback –I proxy_name –k backupdir -x -n