1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="ltdbtool.1">
6 <refentrytitle>ltdbtool</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source"> </refmiscinfo>
9 <refmiscinfo class="manual"> </refmiscinfo>
14 <refname>ltdbtool</refname>
15 <refpurpose>handle ctdb's local tdb copies </refpurpose>
20 <command>ltdbtool [OPTIONS] COMMAND</command>
24 <refsect1><title>DESCRIPTION</title>
26 ltdbtool is a utility to cope with ctdb's local tdb copies (LTDBs)
27 without connecting to a ctdb daemon.
29 <para>It can be used to
30 <itemizedlist spacing='compact'> <!-- mark='opencircle' -->
33 dump the contents of a LTDB, optionally printing the ctdb
34 record header information,
39 convert between an LTDB and a non-clustered tdb
40 by adding or removing ctdb headers and
44 <para>convert between 64 and 32 bit LTDBs where the ctdb record
45 headers differ by 4 bytes of padding.
52 <refsect1><title>COMMANDS</title>
55 <varlistentry><term>help</term>
62 <varlistentry><term>dump <IDB></term>
65 Dump the contents of a LTDB file to standard output in a
66 human-readable format.
71 <varlistentry><term>convert <IDB> <ODB></term>
74 Make a copy of a LTDB optionally adding or removing ctdb headers.
81 <refsect1><title>OPTIONS</title>
84 <varlistentry><term>-p</term>
87 Dump with header information, similar to "ctdb catdb".
92 <varlistentry><term>-s {0|32|64}</term>
95 Specify how to determine the ctdb record header size
96 for the input database:
97 <variablelist spacing="normal">
98 <varlistentry><term>0</term>
100 <para>no ctdb header</para>
103 <varlistentry><term>32</term>
105 <para>ctdb header size of a 32 bit system (20 bytes)</para>
108 <varlistentry><term>64</term>
110 <para>ctdb header size of a 64 bit system (24 bytes)</para>
114 The default is 32 or 64 depending on the system architecture.
119 <varlistentry><term>-o {0|32|64}</term>
122 Specify how to determine the ctdb record header size
123 for the output database, see -s
128 <varlistentry><term>-S <SIZE></term>
131 Explicitly specify the ctdb record header size of the input database in bytes.
136 <varlistentry><term>-O <SIZE></term>
139 Explicitly specify the ctdb record header size for the output database in bytes.
144 <varlistentry><term>-h</term>
154 <refsect1><title>EXAMPLES</title>
156 Print a local tdb in "tdbdump" style:
158 <screen format="linespecific">
159 ltdbtool dump idmap2.tdb.0
163 Print a local tdb with header information similar to "ctdb catdb":
165 <screen format="linespecific">
166 ltdbtool dump -p idmap2.tdb.0
170 Strip the ctdb headers from records:
172 <screen format="linespecific">
173 ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb
177 Strip 64 bit ctdb headers from records, running on i386:
179 <screen format="linespecific">
180 ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb
184 Strip the ctdb headers from records by piping through tdbrestore:
186 <screen format="linespecific">
187 ltdbtool dump idmap2.tdb.0 | tdbrestore idmap.tdb
191 Convert a local tdb from a 64 bit system for usage on a 32 bit system:
193 <screen format="linespecific">
194 ltdbtool convert -s64 -o32 idmap2.tdb.0 idmap2.tdb.1
198 Add a default header:
200 <screen format="linespecific">
201 ltdbtool convert -s0 idmap.tdb idmap2.tdb.0
205 <refsect1><title>SEE ALSO</title>
207 ctdbd(1), ctdb(1), tdbdump(1), tdbrestore(1),
208 <ulink url="http://ctdb.samba.org/"/>
211 <refsect1><title>COPYRIGHT/LICENSE</title>
213 Copyright (C) Gregor Beck 2011
214 Copyright (C) Michael Adam 2011
216 This program is free software; you can redistribute it and/or modify
217 it under the terms of the GNU General Public License as published by
218 the Free Software Foundation; either version 3 of the License, or (at
219 your option) any later version.
221 This program is distributed in the hope that it will be useful, but
222 WITHOUT ANY WARRANTY; without even the implied warranty of
223 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
224 General Public License for more details.
226 You should have received a copy of the GNU General Public License
227 along with this program; if not, see http://www.gnu.org/licenses/.