Skip To Content

恢复数据存储

如果您无法访问门户托管要素图层使用的数据(例如,关系数据存储发生故障或编辑者从托管要素图层中删除了错误数据),则可以使用备份文件恢复数据。

如果关系数据存储出现故障,则在新计算机上安装 ArcGIS Data Store 并使用 restoredatastore 实用程序恢复最新可用备份。要将托管要素图层数据恢复至指定的时间点,则请在现有数据存储顶部进行恢复并指定要恢复到的日期和时间。

已压缩用于恢复的备份文件。恢复数据后,必须将这些文件解压到过渡位置。这表示您需要具有可兼容此数据的过渡位置。默认情况下,在数据目录中过渡文件。

提示:

如果关系数据存储中存在大量数据,则您可能希望设置单独过渡位置并为数据库恢复指定单独过渡位置。您可以使用 changestaginglocation 实用程序指定单独过渡位置。

注意,恢复时客户端和服务将无法访问数据存储。

发生故障后恢复

如果硬件停止运行或关系数据存储不可用且无法返回到在线状态,则在新计算机上安装 ArcGIS Data Store,然后使用 restoredatastore 实用程序对其应用备份文件。这将恢复数据存储中的要素图层数据并会保留注册到现有 ArcGIS Server 站点的数据存储。注意,尽管如此也不会恢复现有场景图层的缓存。

  1. 在新计算机上安装 ArcGIS Data Store
  2. 使用以管理员身份运行选项打开命令提示符。
  3. 运行 <ArcGIS Data Store installation directory>\datastore\tools 中的 restoredatastore 实用程序以恢复数据存储的最近备份。
    将数据存储恢复到新计算机的语法如下:
    restoredatastore --target most-recent --source-loc <location of backup files> --bound <true|false> --data-dir <new data store directory>

    本示例会将最近备份存储从 \\fortknox\backups\datastore 恢复到 C:\arcgisdatastore。由于在默认情况下该数据存储仍会受到将其注册到的 ArcGIS Server 站点的限制,因此您无需指定 --bound true

    restoredatastore --target most-recent --source-loc \\fortknox\backups\datastore --data-dir C:\arcgisdatastore
    You are going to restore the data store from a data store backup. This process could take a long time, depending on the size of your data. Please do not interrupt the process once it has started.
    Do you want to continue (Yes or No)? Yes

    如果指定的目录不存在,则将创建目录。如果存在,您必须对其具有写入访问权限,且该目录必须为空。否则,恢复操作将失败。

  4. 输入确认希望恢复数据存储。

将现有数据存储恢复至特定时间点

您可以选择希望将现有数据存储要素图层数据恢复到的时间点。例如,如果编辑者对要素图层中的数据进行了大量编辑,但是在第二天发现这些编辑是错误的,则您可以将数据存储恢复至进行编辑前的状态。

指定的时间必须是协调世界时间 (UTC)。

注:

在将数据存储恢复至的时间点之后发布到门户的所有要素图层将不再有效,因为这些图层所使用的数据将不再存在于数据存储中。

还需注意的是如果您禁用了自动备份,则无法恢复至指定时间点。

  1. 使用以管理员身份运行选项打开命令提示符。
  2. 运行 <ArcGIS Data Store installation directory>/datastore/tools 中的 restoredatastore 实用程序将数据恢复至特定时间点。

    将数据存储恢复到特定时间点的语法如下:

    restoredatastore --target <date and time> --source-loc <location of backup files>

    例如,键入以下内容将 \\fortknox\backups\datastore 上文件中的数据存储恢复至其在 2014 年 3 月 20 日 5:00 p.m. UTC 的 状态:

    restoredatastore --target 2014-03-20-17:00:00 --source-loc /net/fortknox/backups/datastore
    You are going to restore the data store from a data store backup. This process could take a long time, depending on the size of your data. Please do not interrupt the process once it has started.
    Do you want to continue (Yes or No)? Yes

  3. 输入确认希望恢复数据存储。
    提示:

    如果希望把恢复命令(包括禁止确认提示符的标记)改写为脚本,则请按以下示例操作:

    restoredatastore --target 2014-03-20-17:00:00 --source-loc /net/fortknox/backups/datastore --prompt no

    您的要素图层数据将恢复至您指定的时间点。