Show Table of Contents
3.4. 設定の変更をファイルに保存
pcs コマンドを使用する際、-f オプションを使うとアクティブの CIB に影響を与えずに設定変更をファイルに保存することができます。
クラスターが設定済みでアクティブな CIB が存在する場合は、次のコマンドを使用すると raw xml ファイルを保存できます。
pcs cluster cib filename
たとえば、次のコマンドを使用すると CIB の raw xml が
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 の現在のコンテンツを 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.