temip_backup(1) — Commands
NAME
temip_backup − TeMIP backup tool
SYNOPSIS
temip_backup [options] group_descriptor1 group_descriptor2...
RESTRICTIONS
You must be root to use this command.
DESCRIPTION
The temip_backup command is used to save/restore TeMIP operational files.
This command intend to help TeMIP administrator to put in place a backup strategy.The purpose of such a strategy is to get optimal TeMIP operational availability by recovering situations in which TeMIP internal databases get unusable due to data corruption.
temip_backup allows to perform backup operation, save or restore, group by group. In this perspective a group is a set of related files that must be saved/restored all together to insure global coherency.
Group descriptor general format is:
action_id file1... action_id is a string identifying the operation to be applied to the files listed in UNIX way (space-separated patterns) on the same line. Accepted actions are: (flat) file(s) copied unconditionnaly by using cp command (flat) file(s) copied by using cp command if the last modification date has changed since tns tlog file(s) copied unconditionnaly (with remove of old version) by using cp command tns checkpoint file(s) copied (with remove of old version) by using cp command if the last modification date has changed since C-ISAM database(s) copied unconditionnaly by using temip_ds_copy tool. (only the .idx files have to be listed.) C-ISAM database(s) copied by using temip_ds_copy tool if the last modification date has changed since previous group save. (only the .idx files have to be listed.) Central Logging of Command (LOC) repositery move performed unconditionnaly (designated by .config file) This action cannot be revert by -restore operation. mir C-isam database copied by using temip_mir_backup tool if the last modification date has changed since previous group save. (only the .idx files have to be listed.) ndbm database(s) copied by using mcc_ndbm tool if the last modification date has changed since previous group save. (only the .dir files have to be listed.) The list of supported actions can also be obtained by using -l option:
# temip_backup -l A set of group descriptor templates are provided with TeMIP kit. They allow to describe TeMIP standard configuration. Refer to TeMIP Framework Configuration and Management Guide to get information about how to build customized groups from these templates.
To get file coherency, temip_backup needs to meet a steady window during which none of the files belonging to the processed group are modified. To meet this constrain an iterating scheme is used. At each iteration, files modified since last iteration are processed (except if associated action is of xx_nocond type, see table above), then, after a delay (configurable by using -d option), a new iteration is done. This sequence is repeated until no file are processed during current iteration, or the maximum number of allowed iterations is reached (configurable by using -n option).
ARGUMENTS
group_descriptor
Group descriptor(s) to which requested operation must be applied.
When called without any parameter, usage information is displayed.
FLAGS
-a
Retrieve automatically the more recent saveset path
Meaningfull only when conjugated with -restore or -recover options. When not given nor -p option, group_description_filename pathname is applied.
(-p option has precedence over -a option)
-d delay_between_retries_in_seconds
Set the delay to apply between two consecutive retries to get a steady window for all the files belonging to the group under process.
When not given, a default value of 10s is applied.
-l
Lists supported backup action types. These actions are the one that can be used in group descriptor file.
(No backup operation is performed and other parameters are ignored.)
-n max_retries_nb
Gives the maximum number of tries to get a steady window for the group under process. If the maximum number of retries is reached without meeting a steady window, current group process is aborted.
When not given, a default value of 10 is applied.
-p saveset_directory_path
Gives the path of the location where the saveset to be produced/used are to be put/get from.
When not given nor -a option set, default location is the directory where is located the group descriptor.
(This option has precedence over -a option.)
-quiet
Don’t print messages for normal condition status.
(This option allows to reduce generated output.)
-recover
Apply recover operation. It consists in restoring files from saveset and then trying to recover from log files when available.
(This option has precedence on -restore option.)
Default operation is save operation. It consists in saveset building from operational TeMIP files.
-restore
Apply restore operation. It consists in replacing TeMIP operational files belonging to the designated group by the ones present in a previously built saveset, typically the more recently built, associated to this group.
Default operation is save operation. It consists in saveset building from operational TeMIP files.
-t
Set test mode to help action debugging. This option may be usefull when a new action has been added to handle a specific type of file that needs particullar save, restore or recover process.
When test mode is active, temip_backup_processline ksh shell script used to process each line of group descriptor is traced and output of called commands is echoed to standard output.
When test mode is off, called commands output is redirected in a file with .out extension and located in saveset directory.
EXEMPLES
1.Save two particular groups:
# temip_backup /save/groups/ah.group /save/groups/el.group
2.Use crontab facility to get scheduled backup: 30 0 ∗ ∗ 0,2,4,6 ksh ’/usr/bin/temip_backup -p /save/even/ /save/groups/∗.group’ 30 0 ∗ ∗ 1,3,5 ksh ’/usr/bin/temip_backup -p /save/odd/ /save/groups/∗.group’ In that example all the groups are saved every day alterning even and odd days.
The flip-flop scheme, between even and odd days, is used to insure that a saveset is not erased before a newer one is available.
Similar rules can be added to save more frequently, say every hours, often used groups, typically alarm handling and event logging groups.
3.Save operation on an heavily used system:
# 30 0 ∗ ∗ 0,2,4,6 /usr/bin/nice -n -10 ksh ’/usr/bin/temip_backup -d 2 -n 20 -p /save/even/ /save/groups/∗.group In that example, to insure save process is able to meet a steady window for all the saved groups, it has been necessary to reduce delay between two iterations to two seconds, to increase the maximum iterations number to 20 and, to increase process priority to run at an higher priority level than TeMIP operational processes.
Such actions may be necessary on a system managing many TeMIP operators.
4.Apply recover to a group:
# temip_backup -recover -a /save/groups/ah.group 5.Restore the whole configuration from a particular saveset:
# temip_backup -restore -p /save/all.0495/ /save/groups/∗.group
NOTES
Ingres/Oracle and DNS external databases are out of the scope of temip_backup as it is assumed these databases are globally administred by using specific tools.
Although temip_backup. allows to perform save operations while TeMIP is in use, restore/recover operations MUST be performed after insuring that there is no operation in progress involving restored or recovered files.
temip_backup tool encapsulates several tools, such as mcc_ndbm or temip_ds_backup, that were previously released with TeMIP product and documented as usable by themselves.
It is now highly recommended to not use these tools directly but thru temip_backup tool only.
RELATED INFORMATION
Commands: crontab(1), mcc_ndbm(1), temip_backup(1), temip_check(1), temip_ds_copy(1), temip_ds_repair(1), temip_mir_backup(1), temip_mir_recover(1), temip_mir_restore(1), temip_restore_ahmir(1), temip_restore_elmir(1), temip_restore_one_log(1), temip_restore_one_oc(1)
Documentation: TeMIP Framework Configuration and Management Guide TeMIP Utilities