NOODB Archive - 恢复

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

  • 关于时间戳的报告

  • 从热拷贝备份集恢复

  • 从热副本备份恢复到特定事务

使用safe提交与运行nuodb存档

尽管 安全提交 有助于防止创建数据不一致(例如,显示为“NULL描述符”失败的错误,它不正确地纠正存档中已写入冷原子的不一致。

运行NOODB存档实用程序查找和修复诸如缺少描述符的问题。

Nuodb存档可以在数据库运行时在停止存储管理器的存档上运行,以查找问题而不使数据库关闭,因此初始检查不必导致停机时间。修复可以在各个表格上完成,因此修复不一定要慢。

也可以看看: 验证数据库.

句法

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

争论

<location>

备份集目录的完全限定路径。

如果要还原到快照,则此选项指定包含您还原的快照的存档目录的路径。

选项

还原语法是:

nuoarchive restore [<restore options>] <location>

还原选项是:

--help

显示选项列表。

--quiet

不要显示任何输出。

--restore-dir

还原到此目的地目录中。

--restore-snapshot

还原此快照(由事务ID标识)。

--backup-element-id

通过此备份元素ID还原备份设置。

--report-backups

报告备份元素类型/ id映射,按最新的顺序。

--report-timestamps

报告时间戳/事务ID映射。

用法

还原加密档案

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. 密码不会在键入时向屏幕回音。

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.

报告时间戳

诺博德档案馆 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--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 恢复选项.

恢复快照

诺博德档案馆 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 恢复选项.

有效的时间点恢复

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.

例子

有关使用NuoArchive Restore的示例,请参阅 还原到特定的交易恢复整个备份集.