NuoDB Archive - Restoring

In the course of restoring an archive from a hot copy backup set, you can use the nuoarchive restore to:

  • Report on timestamps

  • Restore from hot copy backup set

  • Restore to a specific transaction from a hot copy backup

Using Safe Commit versus running NuoDB Archive

While safe commit helps to prevent the creation of data inconsistencies (for example, errors that manifest as the "null descriptor" failure), it does not correct inconsistencies that are already written to cold atoms in the archive.

Running the NuoDB Archive utility finds and repairs issues such as a missing descriptor.

NuoDB Archive can be run on the archive of a stopped storage manager while the database is running to look for issues without bringing the database down, so the initial check does not have to result in downtime. Repair can be done on individual tables, so the repair does not necessarily have to be slow.

Syntax

nuoarchive restore [option [...] ] [<location>]

Arguments

<location>

Fully qualified path to the backup set directory.

If you are restoring to a snapshot then this option specifies the path of the archive directory that contains the snapshot you are restoring to.

Options

Restore syntax is:

nuoarchive restore [<restore options>] <location>

Restore Options are:

--help

Display a list of options.

--quiet

Do not show any output.

--restore-dir

Restore into this destination directory.

--restore-snapshot

Restore this snapshot (identified by transaction ID).

--backup-element-id

Restore the backup set up through this backup element ID.

--report-backups

Report backup element type/ID mappings, in order of newest first.

--report-timestamps

Report timestamp/transaction ID mappings.

Usage

Restoring Encrypted Archives

If nuoarchive restore detects that the backup set is encrypted, you will be prompted to enter the storage password that was current when the backup set was created. The password will not be echoed to the screen as it is typed.

If you prefer to provide the password non-interactively, you can either use a pipe to send the password via standard input, or else set the storage password in the NUODB_STORAGE_PASSWORD environment variable.

If the password is not correct then nuoarchive will exit.

Report timestamps

NuoDB Archive supports an option called --report-timestamps that can be used to report every transaction that can be restored in a backup set, along with the timestamp at which it was committed. This timestamp was chosen by the TE that performed the commit, and it is chosen at pre-commit time. Timestamps will not appear in strict order when the database contains multiple TEs, instead they will be partially ordered by committing TE.

You may optionally specify a time window of interest to restrict the number of transactions output by this tool. To restrict the lower bound of timestamps, use the --start-time option. To restrict the upper bound of timestamps, use the --end-time option.

Timestamps output by --report-timestamps are in GMT. The timestamps input to --start-time and --end-time must be in GMT and must be in the strict ISO 8601 combined date and time representation, that is, “YYYY-MM-DDTHH:MM:SS”.

For information on NuoDB Archive options relevant to --report-timestamps, see Restore Options.

Restore snapshot

NuoDB Archive supports an option called --restore-snapshot that can be used in conjunction with --restore-dir to restore a transaction. Pass the transaction ID (of the transaction to restore) to --restore-snapshot, and the directory into which the restored archive should be constructed to --restore-dir.

For information on NuoDB Archive options relevant to --restore-snapshot, see Restore Options.

Efficient point-in-time restore

It is important to give NuoDB Archive enough memory during point-in-time restore, especially if the database being restored has large indexes. A simple rule of thumb is to restore on a host that is not currently running a database, and give NuoDB Archive as much memory as is normally given to an SM. Adjust the amount of memory given to NuoDB Archive with the --mem option.

Examples

For examples of using nuoarchive restore, see Restoring to Specific Transactions and Restoring Entire Backup Set.