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

Performing a Physical-Only or Logical-Only Restore

This diagram shows the syntax for a physical-only or logical-only restore.

Read syntax diagramSkip visual syntax diagramPerforming a Physical-Only or Logical-Only Restore:
 
|-- -r--+----------------+-------------------------------------->
        |           (1)  |
        '- -q--name------'
 
>--+- -l--+----------+--+---------------+--+----------------------+---------+--|
   |      |     (1)  |  +- -t--time-----+  |               (1)    |         |
   |      +- -i------+  |          (2)  |  +- -f--filename--------+         |
   |      |     (1)  |  '- -n--log------'  | .------------------. |         |
   |      '- -I------'                     | V             (1)  | |         |
   |                                       '---logstreamid------+-'         |
   +- -p--+-----+--+-----------+--+------------------+----------------------+
   |      +- -e-+  '- -t--time-'  +- -f--filename----+                      |
   |      '- -O-'                 | .--------------. |                      |
   |                              | V              | |                      |
   |                              +---dbspace_list-+-+                      |
   |                              |     (2)          |                      |
   |                              '- -w--------------'                      |
   |                     (3) (2)                                            |
   '-| Renaming Chunks |----------- -p--+-----------+--+------------------+-'
                                        '- -t--time-'  +- -f--filename----+
                                                       | .--------------. |
                                                       | V              | |
                                                       +---dbspace_list-+-+
                                                       |     (2)          |
                                                       '- -w--------------'
 
Notes:
  1. Extended Parallel Server Only
  2. Dynamic Server Only
  3. See page Syntax
Element Purpose Key Considerations
-r If specified with the -p option, restores the storage spaces only

If specified with the -l option, restores the logical logs only.

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.

-l Specifies a logical restore only

Restores and rolls forward the logical logs.

The logical restore applies only to those storage spaces that have already been physically restored.
logstreamid Uniquely identifies logical-log records that a given coserver generates (XPS) If you supply more than one logstreamid, separate each item in the list with a space. A logstream is a coserver ID.
-n log Indicates the uniqid of the last 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.
-p Specifies a physical restore only You must follow a physical restore with a logical restore before data is accessible unless you use a whole-system restore. This option turns off automatic log salvage before a cold restore.
-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.
-t time Specifies the time of the last transaction to be restored from the logical logs in a cold restore You can specify the onbar -r -p -t command in a warm or cold restore to restore specific storage spaces from an old physical backup. You must then use onbar -r -l to finish the logical restore.

For more information, see Restoring from an Older Backup.

-w Performs a whole-system restore (IDS) To restore the storage spaces only, specify the -w -p option in a cold restore.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]