DOKK / manpages / debian 10 / pacemaker-cli-utils / cibadmin.8.en
PACEMAKER(8) System Administration Utilities PACEMAKER(8)

Pacemaker - Part of the Pacemaker cluster resource manager

cibadmin command [options] [data]

cibadmin - Provides direct access to the cluster configuration.

Allows the configuration, or sections of it, to be queried, modified, replaced and deleted.

Where necessary, XML data will be obtained using the -X, -x, or -p options.

-?, --help
This text
-$, --version
Version information
Increase debug output

Upgrade the configuration to the latest syntax
Query the contents of the CIB
Erase the contents of the whole CIB
Increase the CIB's epoch value by 1
Create an object in the CIB. Will fail if the object already exists.
Find the object somewhere in the CIB's XML tree and update it. Fails if the object does not exist unless -c is specified
Supply an update in the form of an xml diff (See also: crm_diff)
Recursively replace an object in the CIB
Delete the first object matching the supplied criteria, Eg. <op id="rsc1_op1" name="monitor"/>
The tagname and all attributes must match in order for the element to be deleted
When used with --xpath, remove all matching objects in the configuration instead of just the first one
Output an empty CIB
-5, --md5-sum
Calculate the on-disk CIB digest
-6, --md5-sum-versioned
Calculate an on-the-wire versioned CIB digest

-f, --force

Time (in seconds) to wait before declaring the operation failed
Run the command with permissions of the named user (valid only for the root and hacluster accounts)
Wait for call to complete before returning
Command takes effect locally. Should only be used for queries
(Advanced) Allow the target of a --modify,-M operation to be created if they do not exist
(Advanced) When querying an object, do not return include its children in the result

Retrieve XML from the supplied string
Retrieve XML from the named file

-p, --xml-pipe Retrieve XML from stdin

Limit the scope of the operation to a specific section of the CIB.
Valid values are: nodes, resources, constraints, crm_config, rsc_defaults, op_defaults, status
A valid XPath to use instead of --scope,-o
When performing XPath queries, return the address of any matches found.
Eg: /cib/configuration/resources/clone[@id='ms_RH1_SCS']/primitive[@id='prm_RH1_SCS']
(Advanced) Send command to the specified host

Query the configuration from the local node:

# cibadmin --query --local

Query just the cluster options configuration:

# cibadmin --query --scope crm_config

Query all 'target-role' settings:

# cibadmin --query --xpath "//nvpair[@name='target-role']"

Remove all 'is-managed' settings:

# cibadmin --delete-all --xpath "//nvpair[@name='is-managed']"

Remove the resource named 'old':

# cibadmin --delete --xml-text '<primitive id="old"/>'

Remove all resources from the configuration:

# cibadmin --replace --scope resources --xml-text '<resources/>'

Replace the complete configuration with the contents of $HOME/pacemaker.xml:

# cibadmin --replace --xml-file $HOME/pacemaker.xml

Replace the constraints section of the configuration with the contents of $HOME/constraints.xml:

# cibadmin --replace --scope constraints --xml-file $HOME/constraints.xml

Increase the configuration version to prevent old configurations from being loaded accidentally:

# cibadmin --modify --xml-text '<cib admin_epoch="admin_epoch++"/>'

Edit the configuration with your favorite $EDITOR:

# cibadmin --query > $HOME/local.xml
# $EDITOR $HOME/local.xml
# cibadmin --replace --xml-file $HOME/local.xml

crm(8), pcs(8), crm_shadow(8), crm_diff(8)

Written by Andrew Beekhof

Report bugs to users@clusterlabs.org

August 2022 Pacemaker 2.0.1