Skip to main content

Server 主机恢复指南

本指南旨在帮助 Server 管理员在以下情况中恢复 Server 实例:一台或多台原始主机出现故障、迁移到新升级的 Server、从本地服务器迁移到云服务器,以及与基础架构发生变化相关的其他情况。

  • Failure of the original host*

  • Migration to a new Server machine

  • Transition from an on-premises to a cloud Server

  • Other infrastructure changes

通过 Server 恢复,您可以基于原始 Server 的以下内容,使用原始用户、工作流、计划等运行新的 Server:

  • 控制器令牌

  • 控制器节点中的 RuntimeSettings.xml

  • MongoDB 备份

* To fully recover a Server instance in a disaster recovery scenario where the original host is no longer accessible, the RuntimeSettings.xml must be prepared in advance, while the original host is in a fully functioning state. For more details refer to the Disaster Recovery Preparation help page.

以下是Server 恢复过程每个步骤的详细信息:

1 - 准备

2 - Install Alteryx Server

2 - 恢复 RuntimeSettings.xml

3 - 恢复 MongoDB

4 - 恢复其他文件和设置

5 - 启动 Alteryx Server

6 - 测试

可恢复范围

  • 使用嵌入式 MongoDB 的单一默认 Server 安装故障进行恢复。

  • 包含完整必要信息的可用备份。

  • 目标计算机可被覆盖。

不在可恢复范围内

  • 多节点 Server 环境、用户管理的 MongoDB 或用户管理的 SQL Server - 请联系客户支持获取帮助。

  • 备份或还原 ODBC 驱动程序。

  • 备份或还原用户或系统 DSN。

  • 备份或还原在 Windows 中存储的存在于 Alteryx 之外的其他别名。

Prerequisites

  • Version Compatibility:

Original Host

Compatible Target Hosts

2021.4.2.47792 (Patch 5) or newer patch

2021.4.2.47884 (Patch 11) or newer patch of 2021.4 version

2022.1.1.42590 (Patch 3) or newer patch

2022.1.1.42691 (Patch 9) or newer patch of 2022.1 version

2022.3.1.430 (Server GA) or newer patch

2022.3.1.553 (Patch 6) or newer patch of 2022.3 version

2023.1.1.123 (Server GA) or newer patch

2023.1.1.247 (Patch 2) or newer patch of 2023.1 version

All newer and future versions of Alteryx Server

Any GA or patch release as long as the original host and target host are on the same version and patch.

  • Install all database drivers and necessary software for workflow operation before completing the steps outlined in this guide to ensure minimal downtime.

  • Administrator rights on the target host.

  • Access to all credentials used for impersonation including, the service account (if not Local System), the Run As user, and any defined/used workflow credentials.

  • Controller Token from the original host.

  • A direct line of sight is needed to restore your encryption key as part of the recovery. Your new Server will need access to the AlteryxService running on your original Server Controller node over your network. Contact Customer Support if you are unable to meet this prerequisite.

  • Backup of MongoDB from the original host. Learn how to perform a backup.

    For more information on Server Backup & Recovery, please see the Server Backup & Restore Best Practices: Part 1 and Part 2.

  • Verify the target host is set to the same time zone as the original host in Windows time zone settings. If not set to the same time zone, errors might occur in schedule views.

不在可恢复范围内

The following items might not have been leveraged in the original Server. Check if the functionality is being used on your original Server and if so, complete the corresponding steps marked (Optional) in this guide.

  • 多节点 Server 环境、用户管理的 MongoDB 或用户管理的 SQL Server - 请联系客户支持获取帮助。

  • 合并连接文件数据库。

    • Domain

    • Username

    • Password

  • 备份或还原 ODBC 驱动程序。

  • 备份或还原用户或系统 DSN。

  • 备份或还原在 Windows 中存储的存在于 Alteryx 之外的其他别名。

    • System In-DB Data Connections see %ProgramData%\Alteryx\Engine\SystemConnections.xml

    • System Data Connections see%ProgramData%\Alteryx\Engine\SystemAlias.xml

  • Alteryx User-Based and In-DB Connection Aliases from the original Server – the below might be relevant for each run-as or workflow credential user account

    • User Data Connections see C:\Users\[username]\AppData\Roaming\Alteryx\Engine\UserConnections.xml

    • User In-DB Data Connections see C:\Users\[username]\AppData\Roaming\Alteryx\Engine\UserAlias.xml

  • Alteryx Predictive Tools and any R libraries used by workflows in the original Server.

    Predictive Tools should be installed as part of the initial Alteryx Server installation (Step 2) to ensure proper version is installed.

步骤 1:准备

#

步骤

详情

1.1

设置计算机时区

新计算机的 Windows 时区必须设置为与原始计算机一致。

1.2

确保可访问 Alteryx

确保计算机可以连接到 Alteryx 许可系统所使用的 whitelist.alteryx.com

Step 2: Install Alteryx Server

#

Step

Details

2.1

Is the version of Alteryx Server on your original host any of the following versions?

  • 2022.1.1.40869 (Patch 2) or any earlier patch

  • 2021.4.2.47792 (Patch 4) or any earlier patch

  • 2021.3 and all earlier versions

YES: Install or upgrade the target host to the exact same major and patch version that exists on the original host. Use the full install file opposed to the patch install.

If needed, please contact fulfillment@alteryx.com to request the needed install file.

Go to step 2.4.

NO: Continue to step 2.2.

2.2

Is the version of Alteryx Server on your original host listed in the Compatible Target Hosts columns of the Version Compatibility table in the Prerequisites section?

YES: Install or upgrade the target host to the exact same major and patch version that exists on the original host. Use the full install file opposed to the patch install.

If needed, please contact fulfillment@alteryx.com to request the needed install file.

Go to step 2.4.

NO: Continue to step 2.3.

2.3

Install the newest patch version of Alteryx Server on target host

Install or upgrade the target host to the newest patch available for the major version the original host is on (for example, if original host is on 2022.3 Patch 3, install the newest patch of 2022.3 on the target host).

2.4

Configure Alteryx Server

Configure Alteryx Server using default settings and confirm the Server UI appears in a browser.  You do not need to log in.

2.5

Troubleshoot

License key "in use" error

If your license key is still tied to your old server, you will need to deactivate it on that machine. If that machine is inaccessible, contact your License Administrator to release the license.

步骤 2:恢复 RuntimeSettings.xml

#

步骤

详情

3.1

在 bin 文件夹中打开命令提示符 1

以管理员身份打开命令提示符并导航至 Alteryx\bin 文件夹,然后输入以下命令(根据您的安装位置进行调整)。

c: cd \Program Files\Alteryx\bin

c: cd \Program Files\Alteryx\bin

3.2

停止服务

输入命令

net stop alteryxservice

成功后,您应看到“已成功停止 AlteryxService 服务。”

3.3

备份现有的 RuntimeSettings.xml

输入命令

c: cd \ProgramData\Alteryx ren RuntimeSettings.xml RuntimeSettings_BACKUP.xml

c: cd \ProgramData\Alteryx ren RuntimeSettings.xml RuntimeSettings_BACKUP.xml

3.4

还原 RuntimeSettings.xml

YES: Your RuntimeSettings.xml from the Disaster Recovery Process should already be located in your target host’s %ProgramData%\Alteryx\ directory. If not, copy the prepared RuntimeSettings.xml to %ProgramData%\Alteryx\.

Go to step 3.13.

RuntimeSettings.xml 文件从原始 Server 复制到当前的 %ProgramData%\Alteryx\ 目录。

Continue to step 3.5.

3.5

清除控制器令牌

编辑刚刚复制的 RuntimeSettings.xml 并删除 <ServerSecretEncrypted> 标记之间的所有内容,仅保留标记,如下所示:

64ae505fe2c2c.png

保存并关闭文件。

3.6

恢复控制器令牌

使用原始 Server 控制器令牌输入命令

AlteryxService.exe setserversecret=CONTROLLER_TOKEN_FROM_ORIGINAL_SERVER

故障排除:

版本 2021.3+ 在此步骤中可能会出现以下错误:“设置服务器密钥失败:CryptImportKey(3) 出错:数据错误。(-2146893819)”。要纠正此错误,请查看上一步,以确保删除标签之间的值。

3.7

恢复加密存储密钥

步骤 2.6 中重置控制器令牌时,<StorageKeysEncrypted> 值可能已更改。如果是这样,则应将其替换为原始 RuntimeSettings.xml 文件中的值。如果需要,在原始计算机上打开 ProgramData%\Alteryx\RuntimeSettings.xml,以获取所需的值。最简单的方法是同时复制标签,以确保原始 RuntimeSettings.xml 文件标签之间的整个值得以复制。当您在步骤 3 中进行进一步更改时,可以在文本编辑器中将 RuntimeSettings.xml 保持打开状态。

Step 2.7 Restore Encryption Keys

3.8

恢复Run As(运行身份)

如果原始 Server 上有 Run As(运行身份),请输入以下命令,否则跳过此步骤:AlteryxService.exe setexecuteuser=NAME,DOMAIN,PASSWORD

3.9

恢复 SMTP 密码

如果已填写 Alteryx 系统设置 >Server UI > SMTP > Password(即使未选中 SMTP 复选框),请输入以下命令,否则请跳过此步骤。AlteryxService.exe setsmtppassword=PASSWORD

3.10

保存 RuntimeSettings.xml

保存 RuntimeSettings.xml 文件。

3.11

Is the version of Alteryx Server on your original host any of the following versions?

  • 2022.1.1.40869 (Patch 2) or any earlier patch

  • 2021.4.2.47792 (Patch 4) or any earlier patch

  • 2021.3 and all earlier versions

YES: Go to step 3.13.

NO: Continue to step 3.12.

3.12

传输加密密钥

此功能仅适用于以下版本:

  • 2021.4.2 补丁 11+

  • 2022.1 补丁 9+

  • 2022.3 补丁 6+

  • 2023.1 补丁 2+

  • 2023.2 GA+

Important: Please note that this requires the AlteryxService to be running on your original host and your target host will need to be able to access it over the network.

您可以按照加密密钥传输过程的步骤将加密密钥从现有控制器传输到新控制器。

3.13

留在命令行上

步骤 3 假定您在 \Alteryx\bin 文件夹中且位于管理员命令行上。

步骤 3:恢复 MongoDB

#

步骤

4.1

获取 MongoDB 备份

将 Mongo 备份从原始 Server 复制到新 Server 上的 MONGO_BACKUP 文件夹。

4.2

恢复到新文件夹

将 Mongo 数据库从备份文件夹恢复到新的还原文件夹。最后一个参数 ,10 可确保恢复期间 MongoDB 的内存使用量较低。这可以降低内存不足错误的几率,但可能会增加恢复时间。去掉 ,10 可能会加快恢复速度。在这两种情况下,请按照下面的说明检查 mongoRestore.log,以确保还原成功。

AlteryxService.exe emongorestore="MONGO_BACKUP_FOLDER","MONGO_RESTORE_FOLDER",10

4.3

确认恢复成功

确认恢复成功。

注意

这是必要步骤,因为还原失败不会在上一步中报告,并可能导致您 Server上的数据丢失。为此,请找到已恢复数据的 MongoDB 文件夹,查看 mongoRestore.log 文件。打开 mongoRestore.log 并执行以下步骤:

  • 确认最后一行报告 #### document(s) restored successfully, 0 document(s) failed to restore(文档已成功恢复,并且所有文档均成功恢复)

  • 搜索error(错误)critical(严重)fatal(致命)failed(失败)。如果您正在寻找failed,请确保结果与上一点中的句子不同,其中包含 0 document(s) failed(0 个失败的文档)

如果恢复失败,或者在搜索上面列出的关键字时找到任何结果,请联系支持部门并提供您收集的所有信息。

如果 MongoDB 恢复失败,请勿继续操作。

4.4

在 RuntimeSettings.XML 中设置 Mongo 路径

编辑 RuntimeSettings.xml 并在 <EmbeddedMongoDBRootPath> 标签中输入 MONGO_RESTORE_FOLDER 的路径。

示例:

Set Mongo path in RuntimeSettings.XML

保存并关闭文本编辑器。

4.5

启动 MongoDB

输入命令

mongod ––dbpath "MONGO_RESTORE_FOLDER" ––auth ––port 27018

示例

mongod ––dbpath "%ProgramData%\Alteryx\Service\Persistence\Mongo_Restore" ––auth ––port 27018

请勿关闭命令提示符窗口。

如果您在步骤 3.5 中关闭窗口,则后续步骤都将无法进行。

<< 第二个命令提示符部分开始 >>

4.6

在 bin 文件夹中打开第二个命令提示符

以管理员身份打开第二个命令提示符并导航至 Alteryx\bin 文件夹,然后输入以下命令(根据您的安装位置进行调整)。

c: cd \Program Files\Alteryx\bin

c: cd \Program Files\Alteryx\bin

4.7

获取非管理员 Mongo 密码

输入命令并将 NON_ADMIN_MONGO_PASSWORD 复制到记事本

AlteryxService.exe getemongopassword

4.8

启动 Mongo 命令行

输入命令

mongosh mongodb://SERVER:PORT/AlteryxGallery -u user -p NON_ADMIN_MONGO_PASSWORD

示例

mongosh mongodb://localhost:27018/AlteryxGallery -u user -p CCEC***33C0

成功后,您应看到“>”提示。

4.9

删除原始 Server 设置的锁定

输入 Mongo 命令

db.locks.remove({})

如果成功,您应看到:“writeResult({ “nRemoved” : N })”,其中 N 是介于 0 和 3 之间的数字。

4.10

Switch to AlteryxService database

Enter the Mongo command

use AlteryxService

4.11

Delete AlteryxService locks set by original Server

Enter the Mongo command

db.locks.remove({})

On success you should see: "writeResult({ “nRemoved” : N })", where N is a number between 0 and 3.

4.12

退出 Mongo 命令行和命令提示符 2

输入命令

exit

关闭 Command_Prompt_2

<<第二个命令提示符部分结束>>

4.13

停止 Mongo 数据库

在原始命令提示符下,输入键盘命令

ctrl-c

输入一次或多次,直到您退出 MongoDB 并返回正常的命令提示符。

关闭命令提示符。

步骤 4:恢复其他文件和设置

#

步骤

详情

5.1

您在原始 Server 上是否有服务登录用户

在新 Server 上设置服务登录用户

Windows 服务应用程序 > 右键单击 AlteryxService > 属性 > 登录

5.2

添加数据驱动程序和系统 DSN。

添加相同版本的驱动程序和相同名称的系统 DSN,以匹配原始 Server https://downloads.alteryx.com/

可能不适用于恢复的高级问题:

5.3

在更安全的环境中,配置所需的Run As(运行身份)用户权限。

确保用于运行工作流的所有凭证(Run As 运行身份、服务登录或保存工作流时设置的凭证)具有足够的访问权限,请参阅配置所需的运行用户权限

5.4

恢复基于系统的别名和库内连接别名

系统数据连接:

%ProgramData%\Alteryx\Engine\SystemAlias.xml

系统库内数据连接:

%ProgramData%\Alteryx\Engine\SystemConnections.xml

5.5

恢复基于用户的别名和用户库内连接别名

用户数据连接:

C:\Users\[username]\AppData\Roaming\Alteryx\Engine\UserConnections.xml

用户库内数据连接:

C:\Users\[username]\AppData\Roaming\Alteryx\Engine\UserAlias.xml

5.6

工作流是否使用连接器?

将连接器文件夹从原始 Server 复制到

%ProgramData%\Alteryx\Tools

联系客户支持以在新 Server 上启用连接器。

5.7

工作流是否使用 Python 工具?

重新安装工作流已安装的 Python 软件包。请参阅 Server Upgrade Python Tool Environment Checklist

5.8

是否使用 SSL?

如果要恢复到 Sandbox Server 进行测试,请使用 HTTP 进行测试。

如果要迁移到新 Server,请重新建立 SSL:

配置 Server SSL/TLS

为获取 SSL 和安装证书配置 Alteryx Server (15577)

步骤 5:启动 Alteryx Server

#

步骤

详情

6.1

查看 Alteryx 系统设置,如果需要,可暂停计划。

运行 Alteryx 系统设置并逐页浏览,确认设置(如控制器令牌)包含您预期的值。

如果不希望在服务启动时运行计划,请取消选中:

Worker > General > Allow machine to run scheduled Alteryx workflows

选择Finish时,AlteryxService 应启动,且 Server 在浏览器中应可用。

重要

请特别注意 Server UI 配置设置,因为新 Server 可能具有不同的 URL 或可能没有 SSL 证书。

System Settings, the Server UI configuration section.

步骤 6:测试

#

步骤

详情

7.1

基本测试

AlteryxService 是否在运行?

您能否:

  • 访问 Server UI URL?

  • 在管理员页面之间移动并查看用户、集合等?

  • 将工作流从 Designer 发布到 Server?

  • 运行工作流?

  • 如果配置允许,请保存并运行指定凭证的工作流。

7.2

特定于工作流的测试

您是否可以运行包含扩展或外部连接的工作流,如

  • 网络 UNC 路径的输入/输出

  • 数据库连接

  • 连接器工具

  • 地理位置或业务洞察数据集

  • Python 工具

  • R 工具