ctdb-tests: Process-exists unit tests should wait until PID is registered
[vlendec/samba-autobuild/.git] / ctdb / doc / ltdbtool.1.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
3         PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4         "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <refentry id="ltdbtool.1">
6
7   <refmeta>
8     <refentrytitle>ltdbtool</refentrytitle>
9     <manvolnum>1</manvolnum>
10     <refmiscinfo class="source">ctdb</refmiscinfo>
11     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
12   </refmeta>
13
14   <refnamediv>
15     <refname>ltdbtool</refname>
16     <refpurpose>manipulate CTDB's local TDB files</refpurpose>
17   </refnamediv>
18
19   <refsynopsisdiv>
20     <cmdsynopsis>
21       <command>ltdbtool</command>
22       <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
23       <arg choice="req"><replaceable>COMMAND</replaceable></arg>
24       <arg><replaceable>COMMAND-ARGS</replaceable></arg>
25     </cmdsynopsis>
26 </refsynopsisdiv>
27
28   <refsect1>
29     <title>DESCRIPTION</title>
30
31     <para>
32       ltdbtool is a utility to manipulate CTDB's local TDB databases
33       (LTDBs) without connecting to a CTDB daemon.
34     </para>
35
36     <para>
37       It can be used to:
38     </para>
39
40     <itemizedlist>
41       <listitem>
42         <para>
43           dump the contents of a LTDB, optionally printing the CTDB
44             record header information,
45         </para>
46       </listitem>
47       <listitem>
48         <para>
49           convert between an LTDB and a non-clustered tdb
50           by adding or removing CTDB headers and
51         </para>
52       </listitem>
53       <listitem>
54           <para>convert between 64 and 32 bit LTDBs where the CTDB record
55           headers differ by 4 bytes of padding.
56           </para>
57       </listitem>
58     </itemizedlist>
59   </refsect1>
60
61   <refsect1>
62     <title>OPTIONS</title>
63
64     <variablelist>
65       <varlistentry><term>-e</term>
66         <listitem>
67           <para>
68             Dump empty records.  These are normally excluded.
69           </para>
70         </listitem>
71       </varlistentry>
72
73       <varlistentry><term>-p</term>
74         <listitem>
75           <para>
76             Dump with header information, similar to "ctdb catdb".
77           </para>
78         </listitem>
79       </varlistentry>
80
81       <varlistentry>
82         <term>
83           -s
84           <group choice="req">
85             <arg choice="plain">0</arg>
86             <arg choice="plain">32</arg>
87             <arg choice="plain">64</arg>
88           </group>
89         </term>
90         <listitem>
91           <para>
92             Specify how to determine the CTDB record header size
93             for the input database:
94             <variablelist spacing="normal">
95               <varlistentry><term>0</term>
96               <listitem>
97                 <para>no CTDB header</para>
98               </listitem>
99               </varlistentry>
100               <varlistentry><term>32</term>
101               <listitem>
102                 <para>CTDB header size of a 32 bit system (20 bytes)</para>
103               </listitem>
104               </varlistentry>
105               <varlistentry><term>64</term>
106               <listitem>
107                 <para>CTDB header size of a 64 bit system (24 bytes)</para>
108               </listitem>
109               </varlistentry>
110             </variablelist>
111             The default is 32 or 64 depending on the system architecture.
112           </para>
113         </listitem>
114       </varlistentry>
115
116       <varlistentry>
117         <term>
118           -o
119           <group choice="req">
120             <arg choice="plain">0</arg>
121             <arg choice="plain">32</arg>
122             <arg choice="plain">64</arg>
123           </group>
124         </term>
125         <listitem>
126           <para>
127             Specify how to determine the CTDB record header size
128             for the output database, see -s.
129           </para>
130         </listitem>
131       </varlistentry>
132
133       <varlistentry><term>-S <parameter>SIZE</parameter></term>
134         <listitem>
135           <para>
136             Explicitly specify the CTDB record header SIZE of the
137             input database in bytes.
138           </para>
139         </listitem>
140       </varlistentry>
141
142       <varlistentry><term>-O <parameter>SIZE</parameter></term>
143         <listitem>
144           <para>
145             Explicitly specify the CTDB record header SIZE for the
146             output database in bytes.
147           </para>
148         </listitem>
149       </varlistentry>
150
151       <varlistentry><term>-h</term>
152         <listitem>
153           <para>
154             Print help text.
155           </para>
156         </listitem>
157       </varlistentry>
158     </variablelist>
159   </refsect1>
160
161   <refsect1>
162     <title>COMMANDS</title>
163
164     <variablelist>
165       <varlistentry><term>help</term>
166         <listitem>
167           <para>
168             Print help text.
169           </para>
170         </listitem>
171       </varlistentry>
172
173       <varlistentry><term>dump <parameter>IDB</parameter></term>
174         <listitem>
175           <para>
176             Dump the contents of an LTDB input file IDB to standard
177             output in a human-readable format.
178           </para>
179         </listitem>
180       </varlistentry>
181
182       <varlistentry>
183         <term>
184           convert <parameter>IDB</parameter> <parameter>ODB</parameter>
185         </term>
186         <listitem>
187           <para>
188             Copy an LTDB input file IDB to output file ODB, optionally
189             adding or removing CTDB headers.
190           </para>
191         </listitem>
192       </varlistentry>
193     </variablelist>
194   </refsect1>
195
196   <refsect1>
197     <title>EXAMPLES</title>
198
199     <para>
200       Print a local tdb in "tdbdump" style:
201     </para>
202     <screen format="linespecific">
203       ltdbtool dump idmap2.tdb.0
204     </screen>
205
206     <para>
207       Print a local tdb with header information similar to "ctdb catdb":
208     </para>
209     <screen format="linespecific">
210       ltdbtool dump -p idmap2.tdb.0
211     </screen>
212
213     <para>
214       Strip the CTDB headers from records:
215     </para>
216     <screen format="linespecific">
217       ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb
218     </screen>
219
220     <para>
221       Strip 64 bit CTDB headers from records, running on i386:
222     </para>
223     <screen format="linespecific">
224       ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb
225     </screen>
226
227     <para>
228       Strip the CTDB headers from records by piping through tdbrestore:
229     </para>
230     <screen format="linespecific">
231       ltdbtool dump idmap2.tdb.0 | tdbrestore idmap.tdb
232     </screen>
233
234     <para>
235       Convert a local tdb from a 64 bit system for usage on a 32 bit system:
236     </para>
237     <screen format="linespecific">
238       ltdbtool convert -s64 -o32 idmap2.tdb.0 idmap2.tdb.1
239     </screen>
240
241     <para>
242       Add a default header:
243     </para>
244     <screen format="linespecific">
245       ltdbtool convert -s0 idmap.tdb idmap2.tdb.0
246     </screen>
247   </refsect1>
248
249   <refsect1><title>SEE ALSO</title>
250     <para>
251       <citerefentry><refentrytitle>ctdb</refentrytitle>
252       <manvolnum>1</manvolnum></citerefentry>,
253
254       <citerefentry><refentrytitle>tdbdump</refentrytitle>
255       <manvolnum>1</manvolnum></citerefentry>,
256
257       <citerefentry><refentrytitle>tdbrestore</refentrytitle>
258       <manvolnum>1</manvolnum></citerefentry>,
259
260       <citerefentry><refentrytitle>ctdb</refentrytitle>
261       <manvolnum>7</manvolnum></citerefentry>,
262
263       <ulink url="http://ctdb.samba.org/"/>
264     </para>
265   </refsect1>
266
267   <refentryinfo>
268     <author>
269       <contrib>
270         This documentation was written by Gregor Beck
271       </contrib>
272     </author>
273
274     <copyright>
275       <year>2011</year>
276       <holder>Gregor Beck</holder>
277       <holder>Michael Adam</holder>
278     </copyright>
279     <legalnotice>
280       <para>
281         This program is free software; you can redistribute it and/or
282         modify it under the terms of the GNU General Public License as
283         published by the Free Software Foundation; either version 3 of
284         the License, or (at your option) any later version.
285       </para>
286       <para>
287         This program is distributed in the hope that it will be
288         useful, but WITHOUT ANY WARRANTY; without even the implied
289         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
290         PURPOSE.  See the GNU General Public License for more details.
291       </para>
292       <para>
293         You should have received a copy of the GNU General Public
294         License along with this program; if not, see
295         <ulink url="http://www.gnu.org/licenses"/>.
296       </para>
297     </legalnotice>
298   </refentryinfo>
299
300 </refentry>