Documentation survey

服务器间同步 - 版本 2

如果您安装了多个 SUSE Manager,有时需要在服务器之间复制内容。使用服务器间同步 (ISS) 可以导出一台服务器(源)的数据,并将其导入另一台(目标)服务器。这对于中心部署方案或断开连接的设置很有用。

在第 2 版 ISS 实现中,SUSE 去除了主从概念。可以在任何 SUSE Manager 服务器之间朝任一方向导出和导入内容。

1. 安装 ISS 软件包

要使用 ISS,需要在源服务器和目标服务器上安装 inter-server-sync 软件包。

2. 内容同步

请在服务器容器内执行相应步骤之前使用 mgrctl term

过程:导出源服务器上的数据
  1. At the command prompt of the SUSE Manager container host of the source server, as root, enter the server container:

    mgrctl term
  2. 在容器内部,执行以下步骤:

    1. Execute the ISS export command. The -h option provides detailed help:

      inter-server-sync export -h

导出过程会创建一个输出目录,其中包含导入过程所需的所有数据。

To avoid data loss or filling up the container file system, store the data on a persistent volume (preferably /var/spacewalk). For more information about persistent volumes, see installation-and-upgrade:hardware-requirements.adoc#server-hardware-requirements.

Contents from the source server needs to be synchronized to the target server.

过程:将导出目录复制到目标服务器
  1. At the command prompt of the SUSE Manager container host of the source server, as root, enter the server container:

    mgrctl term
  2. 在容器内部,执行以下步骤:

    1. Synchronize to the target server:

      rsync -r <导出目录的路径> root@<目标服务器>:~/

复制所有内容后,开始导入这些内容。

过程:在目标服务器上导入数据
  1. At the command prompt of the SUSE Manager container host of the target server, as root, enter the server container:

    mgrctl term
  2. 在容器内部,执行以下步骤:

    1. Execute the ISS import command. The -h option provides detailed help:

      inter-server-sync import -h

3. 数据库连接配置

默认会从 /etc/rhn/rhn.conf 加载数据库连接配置。可以使用参数 --serverConfig 覆盖属性文件位置。

4. 已知限制

  • 源服务器和目标服务器需使用同一版本。

  • 导出和导入组织应该同名。组织名称区分大小写。