![]() This section describes how to use the backup and restore manager to configure backup and restore services.
definitionThe BAR manager defines a set of backup and restore commands, their options, and flags.You can define multiple BAR managers and assign them on an instance by instance or host wide basis. backup and restore servicesThe BAR manager allows you to map different types of backup and restore. You define the commands and parameters, and infx sets up the environment and executes the commands.
In this guide, I will describe the basic types of backup and restore. These are the default types and commands defined in the ontape config file, sub-infx-ontape.ini. Default commands for onbar backup and restore are in: sub-infx-onbar.ini.
define backup typesThe following types of backups are supported, and a command has been defined for each. See the backup reference for more details.
define restore typesThe following types of restores are supported, and a command has been defined for each. See the restore reference for more details.
define parametersThe following parameters have been defined for backup and restore commands. The BAR manager allows you to map these options to flags, as well as specify which options are valid for which backup and restore types.
If a parameter is not set, then nothing is passed. The exception to this is the level parameter, which is defaulted to 0 if not set. specify optionsYou must specify which parameters are valid for which commands, and optionally specify a list of accepted values. infx uses this information to validate the backup and restore commands.back up options
specify flagsChange the way the parameters are passed to the commands. By default, infx puts the parameters as key/value pairs on the command line. You can change how the options are passed,For example, instead of "level=0", pass "-L 0" for the ontape command.
level = -LThese are the default mappings for the ontape command.
specify commandsA command must be defined for each type of backup and restore. The command definitions support ${var} variables in the definition, which represent the parameters passed from the command line. These will be expanded at run time.
Example: definition for full backup, command infx backup type=dbs
[[backup]] type=dbs command=ontape -s ${level} ${ansi} ${buff} ${nolog} ${unbuff} ${tapedev} -v -d options=level=0|1|2 tapedev ansi buff unbuff nolog pre=rm -f ${tapedev}/${host}_${servernum}_[0-9]* post=ls -l ${tapedev}/* pass=100 percent done.Example: backup command translation to ontape command.
optional: verificationAfter a backup or restore command completes, infx can perform an additional failure verification check.
By default, infx checks the command output for the word "failed", and considers the service failed if it is found. You can change this value for each type of command.
For example, check for the string 'error" in the output of the external backup command.
fail=error
You can specify an optional pass check, which is a string that must be found in the output to verify it completed successfully.
For example, only consider ontape backups successful if the string "100 percent done." is found in the output.
pass=100 percent done.
optional: pre & post commandsYou can specify optional commands to be executed before and after the backup or restore command.
Example, remove old backup files from the directory before each backup.
pre=rm -f ${tapedev}/${host}_${servernum}_[0-9]*
Example, execute an ls of the backup directory after each back up.
post=ls -l ${tapedev}/*
backup commandsThese are the ontape commands defined by default.
restore commands
|

level=0|1|2 specifies that the level parameter only accepts the values 0, 1 and 2. The backup service will generate an error if you pass an invalid value. Passing any additional options to the ext, logs, verify or hot backup will also generate an error.