(Contents)(Previous)(Next)

Functionality and Parameters

Call Syntax:

xbackup and xrestore take the following parameters:

-a <Action> The action to perform (see SectionActions)
Default: SAVEDATA.
-d <Database> The name of the database to work on.
Default: Environment variable $SERVERDB
(former $DBNAME).
-f <FileName> Optional: The file (pipe, tape drive) name of the medium. If this parameter is given, the name is checked against the medium definition. A mismatch is considered a fatal error. If the medium name (parameter -m) starts with the string "extern", this parameter is mandatory.
-h "help": Give usage information about the particular interface and output the names of the special media, then terminate.
-m <Medium Name> The medium name used (see Section External Backup Tools).
Default: none.
If only one medium is defined in CONTROL, this is the default. If the definition of another medium is added, there is no default.
-q "quiet": Reduce the output of routine messages.
-r <Directory> The directory in which the ADABAS software is installed.
Default: Environment variable $DBROOT.
-R <Directory> Same as "-r".
-v "verbose": Give more progress messages.
-V Give a version message of xbackup or xrestore. Give the names of the special media in addition.

If the environment variables $DBROOT and $SERVERDB are set properly, the database administrator can do the standard "save the complete database contents to tape" by calling "xbackup -m tape" (provided "tape" has been defined in the Media Manager with the "medium name" of the tape device, e.g. /dev/rmt0).

In case of a disk failure, the administrator can switch the database to cold state, mount the tape written by xbackup, and then perform "xrestore -m tape". This will restore the database contents valid when the backup operation was started.

Detailed information on the use of save and restore functions can be found in the Sections Backup / Save and Backup / Restore.

The media names are arbitrary strings of up to eight characters. It is the user's responsibility to choose names that are appropriate for the files (devices) identified, e.g. "tape" for '/dev/ios0/rstape005h'. If the specified medium (-m parameter) is the name of a parallel group, all group members are used for the operation (e.g.; group "alltapes" with the members "tape0" and "tape1", device names /dev/rmt0 and /dev/rmt1). If the file name given in the medium definition does not exist when a backup is started, CONTROL and/or the database kernel will create that as an ordinary file. In Windows NT, however, a named pipe is recognizable by its name; so, in this case, a pipe is created, not a file.

xbackup and xrestore write progress and error messages to their standard output. If all checks succeed, they call CONTROL (and possibly an archiving tool, see Section External Backup Tools ) to perform the backup or restore operation. When this is finished, they write a message giving the exit code(s) (see Section xbackup / xrestore Exit Codes). xbackup and xrestore terminate with the CONTROL exit code (or the sum of CONTROL and archiver exit codes) which will be zero in the success case and non-zero otherwise.

If a check performed by xbackup or xrestore fails (e.g., the database is not running, or the tool to be called is not installed on the machine), they give a message and terminate with a non-zero exit code.


(Contents)(Previous)(Next)