HP-UX Directory Server 8.1 configuration, command, and file reference
7.3.4 db2bak (Creates a backup of a database)
Creates a backup of the current database contents. This script can be executed while the server
is still running.
Syntax
db2bak [ backupDirectory]
For information on the equivalent Perl script, see “db2bak.pl (Creates a backup of a database)”.
7.3.5 db2ldif (Exports database contents to LDIF)
Exports the contents of the database to LDIF. This script can be executed while the server is still
running, except with the -r option. To export the replication state information, shut down the
server first, then run the db2ldif command with the -r option.
For information on the equivalent Perl script, see “db2ldif.pl (Exports database contents to LDIF)”.
For the shell scripts, the script runs the ns-slapd command-line utility with the db2ldif
keyword. Ellipses (...) indicate that multiple occurrences are allowed.
Syntax
db2ldif [[ -n backendInstance ] | [ -s includeSuffix ]] [ [ -x excludeSuffix]] [ -r ] [
-C ] [ -u ] [ -U ] [ -m ] [ M ] [ -a outputFile ] [ -1 ] [ -N ] [ -E ]
Options Either the -n or the -s option must be specified. By default, the output LDIF will be
stored in one file. To specify the use of several files, use the option -M.
Table 7-7 db2ldif options
DescriptionOption
Deletes, for reasons of backward compatibility, the first line of the LDIF file which gives
the version of the LDIF standard.
-1
Gives the name of the output LDIF file.
-a outputFile
Uses only the main database file.-C
Decrypts encrypted data during export. This option is used only if database encryption is
enabled.
-E
Sets minimal base-64 encoding.-m
Uses multiple several files for storing the output LDIF, with each instance stored in
instance filename (where filename is the file name specified for -a option).
-M
Gives the instance to be exported.
-n backendInstance
Specifies that the entry IDs are not to be included in the LDIF output. The entry IDs are
necessary only if the output of the db2ldif command is to be used as input to the db2index
command.
-N
Exports the information required to initialize a replica when the LDIF is imported. Using
this option requires that the server be stopped first, then run the db2ldif command.
The LDIF file, which is created with the db2ldif command, can be imported using the
ldif2db command. When it is imported, if the -r option was used, then the database is
automatically initialized as a replica.
See “ldif2db (Import)” for information on importing an LDIF file.
-r
Names the suffixes to be included or the subtrees to be included if -n has been used.-s suffix_name
Requests that the unique ID is not exported.-u
Requests that the output LDIF is not folded.-U
Names the suffixes to be excluded.
-x suffix_name
7.3 Shell scripts 219