Restoring Data From Backup Sets

In order to access the data hot copied into backup sets, it must be restored into a database archive.

An Incremental Hot Copy is a hot copy with atoms omitted. Additionally, the atoms have not been modified since written to the previous backup elements.

Before an Incremental Hot Copy operation can be performed, a new full Hot Copy backup using a backup set must be completed. Existing 3.0-x Hot Copy Archives (without a backup set) cannot be used as a reference for an Incremental Hot Copy.

The result of the Full Hot Copy operation is a new backup set directory from which Incremental and Journal Hot Copy operations can store the data.

The control folder located in the backup set directory must be accessible by the Hot Copy command to perform an Incremental or Journal backup. The entire full backup image does not need to be accessible by Hot Copy command for the Incremental Hot Copy command to be executed.

Only one backup can run at a time. Hence, you cannot execute an Incremental backup command while a Full or another Incremental Hot Copy is being executed.

As part of the Hot Copy command, you must manually specify the Storage Manager(s) (SM) to be backed up.

While not enforced, it is recommended that incremental backups be made against the same SMs used for the Full backup.

For more information on backup sets and journals, see Backup Using Backup Sets.

Restoring to Specific Transactions

When using incremental backups, you can restore to a specific transaction using timestamps. To restore to a specific transaction, do the following:

  1. Identify the backup set folder.
    This is the folder to be specified when you invoke the hot copy command.

  2. Using NuoDB Archive (nuoarchive), find available transactions. For example:

  3. Restore a new copy for backup and journaling from the backup set by invoking the ID. In this example we are restoring to the 2017-12-10T19:12:37 timestamp.

  4. Start a new SM from the restored directory:

  5. Start new TE to integrate with the SM:

nuoarchive restore is an offline operation. Do not restore to the transaction on a running database. Neither the source nor the target archives can be in use by a running database. nuoarchive restore creates a new archive and you can then specify this archive when starting a SM.

Restoring to Specific Backup Elements

When using incremental (or journal) backups, you can restore to a specific element using element IDs. To restore to a specific backup element, do the following:

  1. Identify a backup collection to be restored.

  2. Identify the directory where each backup set in the backup collection is located.
    For example, each backup set may be located in a directory on the host where that backup set is hot copied.

  3. Using NuoDB Archive's --report-backups command, generate summaries of each backup set. For example:

  4. Copy summaries to all hosts involved in the restore so that each summary is available on each host. For example, use scp to copy the summary generated on host1 to host2, and vice versa.

  5. Restore a consistent copy of the archive from each backup set using the same backup element ID on each host. The following example demonstrates restoring of the backup set on each host to the first incremental backup element ( /var/opt/nuodb/production-archives/testrestore on host1 and /var/opt/nuodb/production-archives/testrestore on host2).

  6. Start a new database, with Storage Managers (SMs) serving the restored archives. For example, to start a database named testrestore with two SMs serving the restored archives from step 5:

Restoring Entire Backup Set

A backup set is a directory created when initiating a full hot copy. For more background on backup sets, see Backup using Backup Sets. When restoring the database from multiple backup sets to a globally consistent state, XML-based summaries are used as "stand-ins" for backup sets located on remote hosts. Global information available in these XML files enables NuoDB Archive to determine the latest common backup element to be used for Restore Entire Backup.

To restore an entire backup set do the following:

  1. Identify a backup collection to be restored.
    +

  2. Identify the directory where each backup set in the backup collection is located.
    For example, each backup set may be located in a directory on the host where that backup set is hot copied.

  3. Using NuoDB Archive's --report-backups command, generate summaries of each backup set. Each summary should be stored in a file. For example:

  4. Copy summaries to all hosts involved in the restore so that each summary is available on each host. For example, use scp to copy the summary generated on host1 to host2, and vice versa.

  5. Restore a consistent copy of the archive from each backup set by combining the summaries with each backup set. In the following example, we will restore the backup set on each host to produce a consistent copy of the database consisting of two restored archives on two hosts (host1:/var/opt/nuodb/production-archives/testrestore and host2:/var/opt/nuodb/production-archives/testrestore).
    +

  6. Start a new database, with Storage Managers (SMs) serving the restored archives. For example, to start a database named testrestore with two SMs serving the restored archives from step 5:
    +