Home | Previous Page | Next Page   Overview of the ON-Bar Backup and Restore System > Performing an External Backup and Restore > What Is Restored in an External Restore? >

Performing an External Restore

This section describes procedures for performing cold and warm external restores.

Cold External Restore Procedure

If you specify the onbar -r -e command in a cold restore, you must restore all storage spaces. Use the onbar -r -e -p command to restore all or specific storage spaces.

To perform a cold external restore
  1. Shut down the database server.
    Dynamic Server

    To shut down the database server, use the onmode -ky command.

    End of Dynamic Server
    Extended Parallel Server

    To bring the database server to microkernel mode, use the xctl -C oninit -m command.

    End of Extended Parallel Server
  2. Salvage the logical logs:
    onbar -b -l -s
  3. To restore the storage spaces from an external backup, use a copy command, such as cp, dd, or tar on UNIX or a file-backup program.

    You must restore the storage spaces to the same path as the original data and include all the chunk files.

  4. To perform an external restore of all storage spaces and logical logs, use the following command:
    onbar -r -e

    To perform a point-in-time external restore of all storage spaces, use the following command:

    onbar -r -e -t datetime
    Extended Parallel Server

    To perform a physical external restore of specific storage spaces, followed by a logical restore, use these commands:

    onbar -r -e -p rootdbs
    onbar -r -e -p critical_space1
    onbar -r -e -p other_dbspaces
    onbar -r -l
    End of Extended Parallel Server

    This step brings the database server to fast-recovery mode.

  5. ON–Bar and the database server roll forward the logical logs and bring the storage spaces online.
Performing an External Restore when Chunks are Mirrored by the Server

When you mirror chunks using the mirroring support provided by the database server, following a restore the database server assumes that you have restored only the primary chunks from external backup and that mirror chunks do not contain valid data. You must recover mirror chunks manually using the alter dbspace dbspacename online chunk chunkpath command using the onutil utility. During recovery, the server writes the appropriate onutil command you should use to perform the mirror recovery to the message log. You can run these commands at a time you deem appropriate. Because re-creating the mirror chunks consumes server resources, if your goal is to bring the server online as soon as possible following recovery you might want to defer mirror recovery until a scheduled maintenance period.

To restore from an external backup when you use the mirroring support provided by the database server
  1. Shut down the database server.
    Dynamic Server

    To shut down the database server, use the onmode -ky command.

    End of Dynamic Server
    Extended Parallel Server

    To bring the database server to microkernel mode, use the xctl -C oninit -m command.

    End of Extended Parallel Server
  2. Salvage the logical logs:
    onbar -b -l -s
  3. To restore the storage spaces from an external backup, use a copy command, such as cp, dd, or tar on UNIX, or use a file-backup program.

    You must restore the storage spaces to the same path as the original data and include all the chunk files. You need only restore data for the primary chunks.

  4. To perform an external restore of all storage spaces and logical logs, use the following command:
    onbar -r -e

    To perform a point-in-time external restore of all storage spaces, use the following command:

    onbar -r -e -t datetime
    Extended Parallel Server

    To perform a physical external restore of specific storage spaces, followed by a logical restore, use these commands:

    onbar -r -e -p rootdbs
    onbar -r -e -p critical_space1
    onbar -r -e -p other_dbspaces
    onbar -r -l
    End of Extended Parallel Server

    This step brings the database server to fast-recovery mode.

  5. ON–Bar and the database server roll forward the logical logs and bring the storage spaces online.
  6. Perform mirror chunk recovery using onutil.

Mixed External Restore Restriction

ON–Bar does not support mixed external restores. For example, the following sequence of commands might fail:

onbar -r -e rootdbs
onbar -r -e other_dbspaces

Warm External Restore Procedure

The database server is online during a warm external restore. A warm external restore involves only noncritical storage spaces.

To perform a warm external restore
  1. To restore the storage spaces from an external backup, use a copy command, such as cp, dd, or tar on UNIX or a file-backup program.

    You must restore the storage spaces to the same path as the original data and include all the chunk files for each restored storage space.

  2. Perform a warm external restore of the noncritical storage spaces to bring them online.
    1. To restore selected storage spaces and all logical logs, use the following command:
      onbar -r -e dbspace_list
    2. To restore all the down noncritical storage spaces and logical logs, use the following command:
      onbar -r -e
    3. To restore all the down noncritical storage spaces and logical logs in separate steps, use the following commands:
      onbar -r -e -p
      onbar -r -l

      Specify the logstreams for only the coservers from where you restored the dbspaces. For example, use the following command to restore logstreams 1, 2, and 3:

      onbar -r -l 1 2 3
    4. To restore all the noncritical storage spaces and logical logs, use the following command:
      onbar -r -e -O

Examples of External Restore Commands

The following table contains examples of external restore commands.

Action External Restore Command Comments
Complete external restore onbar -r -e In a cold restore, restores everything.
In a warm restore, restores all down noncritical storage spaces.
Physical external restore and separate logical restore onbar -r -e -p
onbar -r -l
You must always perform a logical restore (XPS).
If the external backups come from different times, you must perform a logical restore. The system restores the logical logs from the oldest external backup (IDS).
External restore of selected storage spaces and logical logs onbar -r -e dbspace_list Use this command in a warm external restore only.
External restore of selected storage spaces and separate logical restore onbar -r -e -p dbspace_list onbar -r -l Use this command in a warm external restore only. (IDS)

Use this command in a warm or cold external restore. (XPS)

External point-in-time (cold) restore onbar -r -e -t datetime Be sure to select a collection of backups from before the specified time.
Whole-system external restore (IDS) onbar -r -e -w
or
onbar -r -e -p -w
When you use onbar -r -e -w -p, back up all storage spaces in one block and unblock session. That way, all storage spaces have the same checkpoint.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]