This diagram shows the syntax for the onbar -r commands.
Performing a Complete Restore: |--+- -r--+-+-----+--+----------+--+----------------+-+--+-------------------------+-+--| | | +- -e-+ | (1) | | (1) | | +- -f--filename-----------+ | | | '- -O-' +- -i------+ '- -q--name------' | | .--------------. | | | | | (1) | | | V | | | | | '- -I------' | +---dbspace_list-+--------+ | | | (2) (3) | +- -t--time---------------+ | | '-| Renaming Chunks |-----------------------' | (3) | | | +- -n--log----------------+ | | | (3) | | | '- -w-------+-----------+-' | | +- -t--time-+ | | '- -n--log--' | | (3) | '- -RESTART-----------------------------------------------------------------------'
Element | Purpose | Key Considerations |
---|---|---|
-r | Specifies a restore | In a cold restore, the -r option
restores all storage spaces, salvages and restores the logical logs.
In a warm restore, the -r option restores
all offline storage spaces and restores the logical logs.
You must specify the -r parameter first. |
dbspace_list | Names one or more dbspaces, blobspaces (IDS), sbspaces (IDS), or dbslices (XPS) to be restored | ON–Bar restores only the storage spaces listed. If it is a cold restore, you must list all the critical dbspaces. If you enter more than one storage-space name, use a space to separate the names. |
-e | Specifies an external restore | After you externally restore the storage spaces with a third-party utility, run onbar -r -e to mark the storage spaces as physically restored, restore the logical logs, and bring the storage spaces back online. For details, see Using External Restore Commands. |
-f filename | Restores the storage spaces that are listed in
the text file whose pathname filename provides
Use this option to avoid entering a long list of storage spaces every time that you use this option. |
The filename can be any valid UNIX or Windows filename,
including simple (listfile_1), relative (../backup_lists/listfile_2 or ..\backup_lists\listfile2),
and absolute (/usr/informix/backup_lists/listfile3 or c:\informix\backup_lists\listfile3)
filenames.
This file can list multiple storage spaces per line. |
-i (XPS) | Queries for indexes to be rebuilt and trigger index rebuild if necessary |
This option triggers the rebuild of any indexes that can be rebuilt. It can be used in conjunction with the -r option only, and when used, no additional options can be included. The onbar -r -i command only triggers index rebuild and does not actually restore any storage spaces. You cannot limit the action of onbar -r -i to a subset of storage spaces and you cannot supply a list of dbspaces or dbslices. |
-I (XPS) | Does not query for indexes to be rebuilt and do not trigger index rebuild. | This option is used to control index building.
When used, ON-Bar does not query for indexes that need to be built
and does not rebuild them.
When logical log replay encounters a CREATE INDEX log record, by default ON-Bar schedules each such index for rebuild at the end of the logical roll-forward. Since rebuilding an index can require a significant amount of time and requires shared locks to be held on all table fragments on which the index is defined, you might want to turn off the automatic rebuilding of indexes by using this option. At a later time you can use the onbar -r -i command to rebuild indexes, or you can use SQL commands to drop and redefine such indexes manually.. |
-n log | Indicates the uniqid of
the log to restore in a cold restore
To find the uniqid number, use the onstat -l command (IDS). |
A point-in-log restore is a special kind of point-in-time restore. You must restore all storage spaces in a point-in-log restore so that the data is consistent. If any logical logs exist after this one, ON–Bar does not restore them and their data is lost. |
-O | Overrides internal error checks. Allows the restore of online storage spaces. Forces the re-creation of chunk files that no longer exist. | Used to override internal error checks to perform
the following tasks:
|
-q name | Allows you to assign a name to the restore
This name appears in the onstat utility so that you can follow the progress of the backup session (XPS). |
DBSERVERNAMErandom_number is the default session name. The session name must be unique and can be up to 128 characters. |
-RESTART | Restarts a restore after a database server or ON–Bar failure (IDS) | For the restore to be restartable, the RESTARTABLE_RESTORE
configuration parameter must be set to ON when the restore failure
occurs. If RESTARTABLE_RESTORE is set to OFF, the
-RESTART option does not work. For more information, see Using Restartable Restore to Recover Data (IDS). |
-t time | Specifies the time of the last transaction to be restored from the logical logs in a cold restore | You must specify the onbar -r -t option
(point-in-time) in a cold restore only and must restore all storage
spaces to the same time.
For more information, see Restoring Data to a Point in Time. |
-w | Performs a whole-system restore of all storage spaces and logical logs from the last whole-system backup (IDS) | You must specify the -w option in a cold restore. If you specify onbar -r -w without a whole-system backup, return code 147 appears because ON–Bar cannot find any storage spaces backed up as part of a whole-system backup. |