Home | Previous Page | Next Page   Overview of the ON-Bar Backup and Restore System > Restoring Data with ON-Bar >

Performing a Complete Restore

This diagram shows the syntax for the onbar -r commands.

Read syntax diagramSkip visual syntax diagramPerforming 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-----------------------------------------------------------------------'
 
Notes:
  1. Extended Parallel Server Only
  2. See page Syntax
  3. Dynamic Server Only
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:
  • Force the restore of online storage spaces. If a storage space in the list of storage spaces to restore is online, the -O option allows ON-Bar to bring the storage space offline and then restore it. If this operation succeeds, ON-Bar completes with an exit code of 177.
  • Force the creation of non-existent chunk files. If a chunk file for a storage space being restored no longer exists, the -O option allows ON-Bar to re-create it. The newly created chunk file is cooked disk space, not raw disk space. If ON-Bar successfully re-creates the missing chunk file, ON-Bar completes with an exit code of 179.
  • Force a cold restore to proceed if a critical storage space is missing. In a cold restore, ON-Bar checks whether every critical space is being restored. This check occasionally causes spurious warnings. Use the -O option to override this check. If the warning was valid, the restore will fail. If the warning was spurious and ON-Bar successfully restores the server, ON-Bar completes with an exit code of 115.
-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.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]