NuoDB Archive - Restoring

When restoring an archive from a hot copy backup set, use nuoarchive restore to:

  • Report on timestamps

  • Restore from hot copy backup set

  • Restore to a specific transaction from a hot copy backup

Syntax

nuoarchive restore [--help|--version]
nuoarchive restore [--backup-element-id <BackupElement_id>] [--format [XML|simple]] [--quiet]
                   [--report-backups]
                   [--<nuodb-option-name> <option_argument>]
                   [--report-timestamps [--end-time <time>|--start-time <time>]]
                   [--restore-archive <restored_archive_destination> [--restore-snapshot <transaction_id>]]
                   <location>

Options

--help

Display a list of options.

--version

Show the nuoarchive command version.

--backup-element-id

Restore from the backup set with the specified BackupElement ID.

--format

Display the output in the specified format.

--quiet

Generate no output.

--report-backups

Generate a summary (BackupElement id, type, startDate, and endDate) of the specified backup set, listed in the order of newest first.

--report-timestamps

Generate a summary (timestamp and transaction ID) of the available transactions.

--start-time

Specify the lower end of time range for which to generate transaction summary.

--end-time

Specify the upper end of time range for which to generate transaction summary.

--restore-archive or --restore-dir

Restore the archive to the specified location.

The --restore-dir option is deprecated.
--restore-snapshot

Restore to the snapshot with the specified transaction ID.

location

Fully-qualified path to the backup directory.

nuodb-option-name

For more information, see Database Options. The commonly used process option is --mem, specifying the amount of memory nuoarchive can use.

Usage

Restoring Encrypted Archives

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

To provide the password non-interactively, use a pipe (|) to send the password through standard input or set the storage password in the NUODB_STORAGE_PASSWORD environment variable.

If the password is incorrect, then nuoarchive will exit.

Report Timestamps

NuoDB Archive supports an option called --report-timestamps 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 at pre-commit time. When the database contains multiple TEs, the timestamps will not appear in strict order. Instead, they will be partially ordered based on the committing TE.

Optionally, specify a time window of interest to restrict the number of transactions reported. 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 reported by --report-timestamps are in GMT. The timestamps passed to --start-time and --end-time must be in GMT and in the strict ISO 8601 combined date and time format, that is, YYYY-MM-DDTHH:MM:SS.

Restore Snapshot

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

Efficient Point-in-time Restore

NuoDB Archive must have enough memory during point-in-time restore, especially if the database being restored has large indexes. NuoDB Archive keeps track of the amount of memory it uses. If the memory usage gets close to the limit, it starts throttling the restoration process to free some memory. If NuoDB Archive cannot free the memory, it will throw an Out-of-Memory (OOM) error. To prevent OOM errors and for faster processes, allocate the maximum available memory to nuoarchive. Use the --mem process option to allocate memory to NuoDB Archive. For example:

nuoarchive restore --mem 20G --restore-archive /volumes/archives/test2 --restore-snapshot 3970 /volumes/backupsets/test-2022-04-22
Restore the archive on a host that is not currently running a database, and allocate NuoDB Archive as much memory as an SM.

Examples

For examples, see Restoring Data From Backup Sets.