Show Table of Contents
2.4. 将配置更改保存到文件中
使用
pcs 命令时,可使用 -f 选项将配置更改保存到文件中,而不会影响活跃的 CIB。
如果之前已配置了集群,且已有一个活跃 CIB,则可使用以下命令保存原始 xml 文件。
pcs cluster cib filename
例如:可使用以下命令将原始 xml 从 CIB 保存到名为
testfile 的文件。
pcs cluster cib testfile
以下命令在
testfile1 中创建一个资源,但不会将该资源添加到当前运行的集群配置中。
# pcs -f testfile1 resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.0.120 cidr_netmask=24 op monitor interval=30s
可使用以下命令将
testfile 的当前内容 push 回 CIB 中。
pcs cluster cib-push filename

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.