2011-05-04 16:14:54 +04:00
<?xml version="1.0" encoding="iso-8859-1"?>
2013-07-26 09:09:24 +04:00
< !DOCTYPE refentry
2013-09-23 10:26:16 +04:00
PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
2011-05-04 16:14:54 +04:00
<refentry id= "ltdbtool.1" >
2013-09-23 10:26:16 +04:00
<refmeta >
<refentrytitle > ltdbtool</refentrytitle>
<manvolnum > 1</manvolnum>
<refmiscinfo class= "source" > ctdb</refmiscinfo>
<refmiscinfo class= "manual" > CTDB - clustered TDB database</refmiscinfo>
</refmeta>
2011-05-04 16:14:54 +04:00
2013-09-23 10:26:16 +04:00
<refnamediv >
<refname > ltdbtool</refname>
<refpurpose > manipulate CTDB's local TDB files</refpurpose>
</refnamediv>
2011-05-04 16:14:54 +04:00
2013-09-23 10:26:16 +04:00
<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>
2011-05-04 16:14:54 +04:00
</refsynopsisdiv>
2013-09-23 10:26:16 +04:00
<refsect1 >
<title > DESCRIPTION</title>
<para >
ltdbtool is a utility to manipulate CTDB's local TDB databases
(LTDBs) without connecting to a CTDB daemon.
</para>
2011-05-04 16:14:54 +04:00
<para >
2013-09-23 10:26:16 +04:00
It can be used to:
2011-05-04 16:14:54 +04:00
</para>
2013-09-23 10:26:16 +04:00
<itemizedlist >
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
dump the contents of a LTDB, optionally printing the CTDB
record header information,
2011-05-04 16:14:54 +04:00
</para>
</listitem>
<listitem >
<para >
convert between an LTDB and a non-clustered tdb
2013-09-23 10:26:16 +04:00
by adding or removing CTDB headers and
2011-05-04 16:14:54 +04:00
</para>
</listitem>
<listitem >
2013-09-23 10:26:16 +04:00
<para > convert between 64 and 32 bit LTDBs where the CTDB record
headers differ by 4 bytes of padding.
</para>
2011-05-04 16:14:54 +04:00
</listitem>
</itemizedlist>
</refsect1>
2013-09-23 10:26:16 +04:00
<refsect1 >
<title > OPTIONS</title>
2011-05-04 16:14:54 +04:00
<variablelist >
2013-09-23 10:26:16 +04:00
<varlistentry > <term > -e</term>
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Dump empty records. These are normally excluded.
2011-05-04 16:14:54 +04:00
</para>
</listitem>
</varlistentry>
<varlistentry > <term > -p</term>
<listitem >
<para >
Dump with header information, similar to "ctdb catdb".
</para>
</listitem>
</varlistentry>
2013-09-23 10:26:16 +04:00
<varlistentry >
<term >
-s
<group choice= "req" >
<arg choice= "plain" > 0</arg>
<arg choice= "plain" > 32</arg>
<arg choice= "plain" > 64</arg>
</group>
</term>
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Specify how to determine the CTDB record header size
2011-05-04 16:14:54 +04:00
for the input database:
<variablelist spacing= "normal" >
<varlistentry > <term > 0</term>
<listitem >
2013-09-23 10:26:16 +04:00
<para > no CTDB header</para>
2011-05-04 16:14:54 +04:00
</listitem>
</varlistentry>
<varlistentry > <term > 32</term>
<listitem >
2013-09-23 10:26:16 +04:00
<para > CTDB header size of a 32 bit system (20 bytes)</para>
2011-05-04 16:14:54 +04:00
</listitem>
</varlistentry>
<varlistentry > <term > 64</term>
<listitem >
2013-09-23 10:26:16 +04:00
<para > CTDB header size of a 64 bit system (24 bytes)</para>
2011-05-04 16:14:54 +04:00
</listitem>
</varlistentry>
</variablelist>
The default is 32 or 64 depending on the system architecture.
</para>
</listitem>
</varlistentry>
2013-09-23 10:26:16 +04:00
<varlistentry >
<term >
-o
<group choice= "req" >
<arg choice= "plain" > 0</arg>
<arg choice= "plain" > 32</arg>
<arg choice= "plain" > 64</arg>
</group>
</term>
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Specify how to determine the CTDB record header size
for the output database, see -s.
2011-05-04 16:14:54 +04:00
</para>
</listitem>
</varlistentry>
2013-09-23 10:26:16 +04:00
<varlistentry > <term > -S <parameter > SIZE</parameter> </term>
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Explicitly specify the CTDB record header SIZE of the
input database in bytes.
2011-05-04 16:14:54 +04:00
</para>
</listitem>
</varlistentry>
2013-09-23 10:26:16 +04:00
<varlistentry > <term > -O <parameter > SIZE</parameter> </term>
2011-05-04 16:14:54 +04:00
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Explicitly specify the CTDB record header SIZE for the
output database in bytes.
2011-05-04 16:14:54 +04:00
</para>
</listitem>
</varlistentry>
<varlistentry > <term > -h</term>
<listitem >
<para >
2013-09-23 10:26:16 +04:00
Print help text.
2011-05-04 16:14:54 +04:00
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
2013-09-23 10:26:16 +04:00
<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>
2011-05-04 16:14:54 +04:00
<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 >
2013-09-23 10:26:16 +04:00
Strip the CTDB headers from records:
2011-05-04 16:14:54 +04:00
</para>
<screen format= "linespecific" >
ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb
</screen>
<para >
2013-09-23 10:26:16 +04:00
Strip 64 bit CTDB headers from records, running on i386:
2011-05-04 16:14:54 +04:00
</para>
<screen format= "linespecific" >
ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb
</screen>
<para >
2013-09-23 10:26:16 +04:00
Strip the CTDB headers from records by piping through tdbrestore:
2011-05-04 16:14:54 +04:00
</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 >
2013-09-23 10:26:16 +04:00
<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> ,
2011-05-04 16:14:54 +04:00
<ulink url= "http://ctdb.samba.org/" />
</para>
</refsect1>
2013-09-23 10:26:16 +04:00
<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>
2011-05-04 16:14:54 +04:00
</refentry>