Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

2.4. Saving a Configuration Change to a File

When using the pcs command, you can use the -f option to save a configuration change to a file without affecting the active CIB.
If you have previously configured a cluster and there is already an active CIB, you use the following command to save the raw xml a file.
pcs cluster cib filename
For example, the following command saves the raw xml from the CIB into a file name testfile.
pcs cluster cib testfile
The following command creates a resource in the file testfile1 but does not add that resource to the currently running cluster configuration.
# pcs -f testfile1 resource create VirtualIP ocf:heartbeat:IPaddr2 ip= cidr_netmask=24 op monitor interval=30s
You can push the current content of testfile to the CIB with the following command.
pcs cluster cib-push filename