1 <?xml version="1.0" encoding="iso-8859-1"?>
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">
8 <refentrytitle>ltdbtool</refentrytitle>
9 <manvolnum>1</manvolnum>
10 <refmiscinfo class="source">ctdb</refmiscinfo>
11 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
15 <refname>ltdbtool</refname>
16 <refpurpose>manipulate CTDB's local TDB files</refpurpose>
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>
29 <title>DESCRIPTION</title>
32 ltdbtool is a utility to manipulate CTDB's local TDB databases
33 (LTDBs) without connecting to a CTDB daemon.
43 dump the contents of a LTDB, optionally printing the CTDB
44 record header information,
49 convert between an LTDB and a non-clustered tdb
50 by adding or removing CTDB headers and
54 <para>convert between 64 and 32 bit LTDBs where the CTDB record
55 headers differ by 4 bytes of padding.
62 <title>OPTIONS</title>
65 <varlistentry><term>-e</term>
68 Dump empty records. These are normally excluded.
73 <varlistentry><term>-p</term>
76 Dump with header information, similar to "ctdb catdb".
85 <arg choice="plain">0</arg>
86 <arg choice="plain">32</arg>
87 <arg choice="plain">64</arg>
92 Specify how to determine the CTDB record header size
93 for the input database:
94 <variablelist spacing="normal">
95 <varlistentry><term>0</term>
97 <para>no CTDB header</para>
100 <varlistentry><term>32</term>
102 <para>CTDB header size of a 32 bit system (20 bytes)</para>
105 <varlistentry><term>64</term>
107 <para>CTDB header size of a 64 bit system (24 bytes)</para>
111 The default is 32 or 64 depending on the system architecture.
120 <arg choice="plain">0</arg>
121 <arg choice="plain">32</arg>
122 <arg choice="plain">64</arg>
127 Specify how to determine the CTDB record header size
128 for the output database, see -s.
133 <varlistentry><term>-S <parameter>SIZE</parameter></term>
136 Explicitly specify the CTDB record header SIZE of the
137 input database in bytes.
142 <varlistentry><term>-O <parameter>SIZE</parameter></term>
145 Explicitly specify the CTDB record header SIZE for the
146 output database in bytes.
151 <varlistentry><term>-h</term>
162 <title>COMMANDS</title>
165 <varlistentry><term>help</term>
173 <varlistentry><term>dump <parameter>IDB</parameter></term>
176 Dump the contents of an LTDB input file IDB to standard
177 output in a human-readable format.
184 convert <parameter>IDB</parameter> <parameter>ODB</parameter>
188 Copy an LTDB input file IDB to output file ODB, optionally
189 adding or removing CTDB headers.
197 <title>EXAMPLES</title>
200 Print a local tdb in "tdbdump" style:
202 <screen format="linespecific">
203 ltdbtool dump idmap2.tdb.0
207 Print a local tdb with header information similar to "ctdb catdb":
209 <screen format="linespecific">
210 ltdbtool dump -p idmap2.tdb.0
214 Strip the CTDB headers from records:
216 <screen format="linespecific">
217 ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb
221 Strip 64 bit CTDB headers from records, running on i386:
223 <screen format="linespecific">
224 ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb
228 Strip the CTDB headers from records by piping through tdbrestore:
230 <screen format="linespecific">
231 ltdbtool dump idmap2.tdb.0 | tdbrestore idmap.tdb
235 Convert a local tdb from a 64 bit system for usage on a 32 bit system:
237 <screen format="linespecific">
238 ltdbtool convert -s64 -o32 idmap2.tdb.0 idmap2.tdb.1
242 Add a default header:
244 <screen format="linespecific">
245 ltdbtool convert -s0 idmap.tdb idmap2.tdb.0
249 <refsect1><title>SEE ALSO</title>
251 <citerefentry><refentrytitle>ctdb</refentrytitle>
252 <manvolnum>1</manvolnum></citerefentry>,
254 <citerefentry><refentrytitle>tdbdump</refentrytitle>
255 <manvolnum>1</manvolnum></citerefentry>,
257 <citerefentry><refentrytitle>tdbrestore</refentrytitle>
258 <manvolnum>1</manvolnum></citerefentry>,
260 <citerefentry><refentrytitle>ctdb</refentrytitle>
261 <manvolnum>7</manvolnum></citerefentry>,
263 <ulink url="http://ctdb.samba.org/"/>
270 This documentation was written by Gregor Beck
276 <holder>Gregor Beck</holder>
277 <holder>Michael Adam</holder>
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.
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.
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"/>.