1CIBADMIN(8)           Heartbeat 2.0.8 Adminstration Guide          CIBADMIN(8)
2
3
4

NAME

6       cibadmin  -  read,  modify, or administer heartbeat Cluster Information
7       Base
8

SYNOPSIS

10       cibadmin (--cib_query|-Q) -[Vrwlsmfbp] [-i xml-object-id|-o xml-object-
11       type] [-t t-flag-whatever] [-h hostname]
12
13       cibadmin  (--cib_create|-C)  -[Vrwlsmfbp] [-X xml-string] [-x xml-file‐
14       name] [-t t-flag-whatever] [-h hostname]
15
16       cibadmin  (--cib_replace-R)  -[Vrwlsmfbp]  [-i  xml-object-id|-o   xml-
17       object-type] [-X xml-string] [-x xml-filename] [-t t-flag-whatever] [-h
18       hostname]
19
20       cibadmin  (--cib_update|-U)  -[Vrwlsmfbp]  [-i  xml-object-id|-o   xml-
21       object-type] [-X xml-string] [-x xml-filename] [-t t-flag-whatever] [-h
22       hostname]
23
24       cibadmin  (--cib_modify|-M)  -[Vrwlsmfbp]  [-i  xml-object-id|-o   xml-
25       object-type] [-X xml-string] [-x xml-filename] [-t t-flag-whatever] [-h
26       hostname]
27
28       cibadmin  (--cib_delete|-D)  -[Vrwlsmfbp]  [-i  xml-object-id|-o   xml-
29       object-type] [-t t-flag-whatever] [-h hostname]
30
31       cibadmin (--cib_delete_alt|-d) -[Vrwlsmfbp] -o xml-object-type [-X xml-
32       string|-x xml-filename] [-t t-flag-whatever] [-h hostname]
33
34       cibadmin --cib_erase (-E)
35
36       cibadmin --cib_bump (-B)
37
38       cibadmin --cib_ismaster (-m)
39
40       cibadmin --cib_master (-w)
41
42       cibadmin --cib_slave (-r)
43
44       cibadmin --cib_sync (-S)
45
46       cibadmin --cib_help (-?)
47

DESCRIPTION

49       Cibadmin is the primary administrative  command  for  manipulating  the
50       heartbeat  CIB.   It  can  be  used  to dump all or part of the CIB, to
51       update all or part of it to modify all or part of  it,  to  delete  the
52       entire CIB, or to perform miscellaneous CIB administrative operations.
53
54       Cibadmin  operates  on the XML trees of the CIB, largely without knowl‐
55       edge of the meaning of the updates or queries  being  performed.   This
56       means  that  shortcuts  that  seem natural to humans who understand the
57       meaning of the elements in the XML tree  are  impossible  to  use  with
58       cibadmin  -  which  requires a complete lack of ambiguity, and can only
59       deal with valid XML subtrees (tags/elements) - both on input  and  out‐
60       put.
61
62

OPTIONS

64       --id (-i) xml-object-id
65               the XML id of the XML object being operated on.  This option is
66               deprecated, and may go away in future versions of cibadmin.
67
68       --obj_type (-o) object-type
69               the type of object being operated on.  Valid values are  nodes,
70               resources, status, constraints
71
72       --verbose (-V)
73               turn  on  debug  mode.  Additional -V options increase the ver‐
74               bosity of the output.
75
76       --help (-?)
77               obtain a help message from the cibadmin.
78
79       --cib_erase (-E)
80               Erase the contents of the whole CIB.
81
82       --cib_query (-Q)
83               Query a portion of the CIB.
84
85       --cib_create (-C)
86               Create a new CIB from the argument XML content.
87
88       --cib_replace (-R)
89               Recursively replace an XML object in the CIB.
90
91       --cib_update (-U)
92               Recursively update an object in the CIB.   Updating  an  object
93               replaces   like  members  in  the  XML,  but  does  not  delete
94               attributes not mentioned.
95
96       --cib_modify (-M)
97               Modify the attributes of an object in the CIB.   Object  to  be
98               modified must be specified with a --id option.
99
100       --cib_delete (-D)
101               Delete the first object matching the specified criteria.  e.g.,
102               <tagname id="rsc1_op1" name="monitor"/>.  The tagname  and  all
103               attributes must match in order for the element to be deleted.
104
105       --cib_delete_alt (-d)
106               Delete  the  object  at the specified fully qualified location.
107               e.g.,  <resource  id="rsc1"><operations><op  id="rsc1_op1"/>...
108               Requires -o type option.
109
110       --cib_ismaster (-m)
111               Print a message indicating whether or not the local instance of
112               the CIB software is the master instance  or  not.   Exits  with
113               return code 0 if it is the master instance, or 35 otherwise.
114
115       --cib_sync (-S)
116               Force a full sync of the local CIB against the master CIB.  (or
117               does this force all slave copies to be updated?).
118
119       --crm_xml (-X) xml-fragment-string
120               specifies an XML tag or fragment on the command line for crmad‐
121               min  to operate on.  Note that it must be a complete tag or XML
122               fragment.
123
124       --xml-file (-x) filename
125               specifies XML in a file for cibadmin to operate on.  Note  that
126               it must be a complete tag or XML fragment.
127
128       --xml_pipe (-p)
129               specifies  that  the  XML  for cibadmin to operate on will come
130               from standard input.  Note that it must be a  complete  tag  or
131               XML fragment.
132

SPECIALIZED OPTIONS

134       --cib_bump (-B)
135               This forcibly increases the update counter of the CIB.
136
137       --cib_master (-w)
138               This  command  forces  the  local  CIB instance into read-write
139               mode. This is a highly dangerous command.
140
141       --cib_slave (-r)
142               This command forces the local CIB instance into read-only mode.
143               This is a highly dangerous command.
144
145       --force_quorum (-f)
146               This  will  force a write to the CIB, regardless of whether the
147               cluster has quorum or not. Use carefully.
148
149       --host (-h) hostname
150               specifies the host  to  send  this  command  to  (rarely  used,
151               advanced option)
152
153       --local (-l)
154               command takes effect locally (rarely used, advanced option)
155
156       --no-bcast (-b)
157               Command  will not be broadcast to other nodes, even if it modi‐
158               fies the CIB.  This is a fairly dangerous, rarely used advanced
159               option.
160
161       --sync-call (-s)
162               Wait  for  the  operation  given to cibadmin to complete before
163               exiting.
164

EXAMPLES

166       Need to put a few real examples here...  To get a copy  of  the  entire
167       active  CIB (including status section, etc.) delivered to stdout, issue
168       this command:
169              cibadmin -Q
170
171       To get a copy of the status section (only) delivered to  stdout,  issue
172       this command:
173              cibadmin -Q --obj_type status
174
175       To  add  an  IPaddr2  resource to the resources section, first create a
176       file foo with the following contents:
177              <primitive id="R_10.10.10.101" class="ocf" type="IPaddr2"
178               provider="heartbeat">
179               <instance_attributes id="RA_R_10.10.10.101">
180                <attributes>
181                 <nvpair id="R_ip_P_ip" name="ip" value="10.10.10.101"/>
182                 <nvpair id="R_ip_P_nic" name="nic" value="eth0"/>
183                </attributes>
184               </instance_attributes>
185              </primitive>
186       Then, issue the following command:
187              cibadmin --obj_type resources -U -x foo
188
189       To change the IP address of  the  IPaddr2  resource  previously  added,
190       issue the command below:
191              cibadmin  --id  R_10.10.10.101  -M  -X  '<nvpair  id="R_ip_P_ip"
192              name="ip" value="10.10.10.102"/>'
193       Note: This does not change the  resource  name  to  match  the  new  IP
194       address.   To do that you have to delete and re-add the resource with a
195       new id tag.
196
197       To stop (disable) the IP  address  resource  added  previously  without
198       removing it, create a file called ''bar'' with the following content in
199       it:
200              <primitive id="R_10.10.10.101">
201               <instance_attributes id="RA_R_10.10.10.101">
202                <attributes>
203                 <nvpair id="stop_R_10.10.10.101" name="target_role" value="Stopped"/>
204                </attributes>
205               </instance_attributes>
206              </primitive>
207       Then issue the following command:
208              cibadmin --obj_type resources -U -x bar
209
210       To restart the IP address resource stopped by the previous step,  issue
211       the command below:
212              cibadmin -D -X '<nvpair id="stop_R_10.10.10.101">'
213
214       To  completely  remove  the  IP address resource from the CIB which was
215       added earlier, issue the command below:
216              cibadmin -D -X '<primitive id="R_10.10.10.101"/>'
217
218       To replace the CIB with a new hand-edited version of the CIB, issue the
219       following command
220              cibadmin -R -x $HOME/cib.xml
221       NOTE: you should not edit the cib.xml file in place, but edit a copy of
222       it, since it is frequently updated by the CIB at unpredictable times.
223

FILES

225       /var/lib/heartbeat/crm/cib.xml - the  CIB  (minus  status  section)  on
226       disk.
227

SEE ALSO

229       crm_resource(8), crmadmin(8), lrmadmin(8), heartbeat(8)
230

AUTHOR

232       cibadmin was written by Andrew Beekhof.
233
234       This manual page was originally written by Alan Robertson.
235

CAVEATS

237       cibadmin  is perfectly willing to completely mangle your CIB if you ask
238       it reasonably nicely.
239
240       Because the CIB is updated continually as things change in the cluster,
241       relying  on using the automatically maintained previous copy of the CIB
242       on disk as a backup is likely to be a dissapointing experience.
243

BUGS

245       Note carefully the long options.  Some have - characters in  them,  and
246       some have _ characters in them.
247
248       What does the -t xxx flag do?
249
250
251
252Linux-HA/OpenHA Project  $Date: 2006/06/26 12:54:48 $              CIBADMIN(8)
Impressum