Cibadmin is the primary administrative command for manipulating the
heartbeat CIB.
It can be used to dump all or part of the CIB, to update all or part of it
to modify all or part of it, to delete the entire CIB, or to
perform miscellaneous CIB administrative operations.
Cibadmin operates on the XML trees of the CIB, largely without knowledge of the meaning
of the updates or queries being performed.
This means that shortcuts that seem natural to humans who understand the meaning of
the elements in the XML tree are impossible to use with cibadmin - which requires
a complete lack of ambiguity, and can only deal with valid XML subtrees (tags/elements)
- both on input and output.
OPTIONS
--id (-i) xml-object-id
the XML id of the XML object being operated on.
This option is deprecated, and may go away in future versions of cibadmin.
--obj_type (-o) object-type
the type of object being operated on.
Valid values are nodes, resources, status, constraints
--verbose (-V)
turn on debug mode. Additional -V options increase the verbosity of the output.
--help (-?)
obtain a help message from the cibadmin.
--cib_erase (-E)
Erase the contents of the whole CIB.
--cib_query (-Q)
Query a portion of the CIB.
--cib_create (-C)
Create a new CIB from the argument XML content.
--cib_replace (-R)
Recursively replace an XML object in the CIB.
--cib_update (-U)
Recursively update an object in the CIB.
Updating an object replaces like members in the XML, but does not delete
attributes not mentioned.
--cib_modify (-M)
Modify the attributes of an object in the CIB.
Object to be modified must be specified with a --id option.
--cib_delete (-D)
Delete the first object matching the specified criteria.
e.g., <tagname id="rsc1_op1" name="monitor"/>.
The tagname and all attributes must match in order for the element to be deleted.
--cib_delete_alt (-d)
Delete the object at the specified fully qualified location.
e.g., <resource id="rsc1"><operations><op id="rsc1_op1"/>...
Requires -otype option.
--cib_ismaster (-m)
Print a message indicating whether or not the local instance of the CIB
software is the master instance or not.
Exits with return code 0 if it is the master instance, or 35 otherwise.
--cib_sync (-S)
Force a full sync of the local CIB against the master CIB.
(or does this force all slave copies to be updated?).
--crm_xml (-X) xml-fragment-string
specifies an XML tag or fragment on the command line for crmadmin to operate on.
Note that it must be a complete tag or XML fragment.
--xml-file (-x) filename
specifies XML in a file for cibadmin to operate on.
Note that it must be a complete tag or XML fragment.
--xml_pipe (-p)
specifies that the XML for cibadmin to operate on will come from standard input.
Note that it must be a complete tag or XML fragment.
SPECIALIZED OPTIONS
--cib_bump (-B)
This forcibly increases the update counter of the CIB.
--cib_master (-w)
This command forces the local CIB instance into read-write mode. This is
a highly dangerous command.
--cib_slave (-r)
This command forces the local CIB instance into read-only mode. This is
a highly dangerous command.
--force_quorum (-f)
This will force a write to the CIB, regardless of whether the cluster
has quorum or not. Use carefully.
--host (-h) hostname
specifies the host to send this command to (rarely used, advanced option)
Command will not be broadcast to other nodes, even if it modifies the CIB.
This is a fairly dangerous, rarely used advanced option.
--sync-call (-s)
Wait for the operation given to cibadmin to complete before exiting.
EXAMPLES
Need to put a few real examples here...
To get a copy of the entire active CIB (including status section, etc.) delivered
to stdout, issue this command:
cibadmin -Q
To get a copy of the status section (only) delivered
to stdout, issue this command:
cibadmin -Q --obj_type status
To add an IPaddr2 resource to the resources section, first
create a file foo with the following contents:
This manual page was originally written by Alan Robertson.
CAVEATS
cibadmin is perfectly willing to completely mangle your CIB
if you ask it reasonably nicely.
Because the CIB is updated continually as things change in the cluster, relying
on using the automatically maintained previous copy of the CIB on disk as a backup
is likely to be a dissapointing experience.
BUGS
Note carefully the long options.
Some have - characters in them, and some have _ characters in them.