每天充电半小时之Cobbler(17)

Replicate

cobbler replicate --help

通过将配置从一个cobbler服务器下载到另一个服务器来进行复制。

cobbler replicate --master=master.example.org

使用默认参数,仅同步发行版和配置文件元数据。在没有任何其他同步标志的情况下,假设已经可以访问支持这些对象(例如内核/ initrds等)的数据。

不仅转移元数据

Cobbler还可以传输镜像树,包,片段,kickstart模板和触发器。

cobbler replicate --help
Usage: cobbler [options]

Options:
  -h, --help            show this help message and exit
  --master=MASTER       Cobbler server to replicate from.
  --distros=PATTERN     pattern of distros  to replicate
  --profiles=PATTERN    pattern of profiles to replicate
  --systems=PATTERN     pattern of systems to replicate
  --repos=PATTERN       pattern of repos to replicate
  --image=PATTERN       pattern of images to replicate
  --omit-data           do not rsync data
  --prune               remove objects (of all types) not found on the master

运行方式

元数据通过Cobbler XMLRPC传输,因此您需要访问Cobbler XMLRPC端点 - http:// servername:80 / cobbler_api。这是只读API,因此不需要身份验证。文件通过rsync(通过ssh)或scp传输。

限制

双向同步数据是完全可以的,同步的元数据没有加上上次编辑时间的时间戳。

常见用例

High Availability / Disaster Recovery

远程cobbler服务器定期从主服务器复制以保持可用性。

Load Balancing

与HA /DR类似,可以考虑使用 触发器通知其他服务器在发出命令时提取新元数据。

Multiple Geographies

几个远程服务器从主服务器拉出元数据,可以由中央服务器上的触发器触发,或者在cron上触发。管理员可以选择是否应集中管理系统记录。

猜你喜欢

转载自blog.csdn.net/weixin_40042382/article/details/81711304