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