| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ltdbtool</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ltdbtool.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ltdbtool — manipulate CTDB's local TDB files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ltdbtool</code> [<em class="replaceable"><code>OPTION</code></em>...] {<em class="replaceable"><code>COMMAND</code></em>} [<em class="replaceable"><code>COMMAND-ARGS</code></em>]</p></div></div><div class="refsect1"><a name="idp50693984"></a><h2>DESCRIPTION</h2><p>
|
|---|
| 2 | ltdbtool is a utility to manipulate CTDB's local TDB databases
|
|---|
| 3 | (LTDBs) without connecting to a CTDB daemon.
|
|---|
| 4 | </p><p>
|
|---|
| 5 | It can be used to:
|
|---|
| 6 | </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
|
|---|
| 7 | dump the contents of a LTDB, optionally printing the CTDB
|
|---|
| 8 | record header information,
|
|---|
| 9 | </p></li><li class="listitem"><p>
|
|---|
| 10 | convert between an LTDB and a non-clustered tdb
|
|---|
| 11 | by adding or removing CTDB headers and
|
|---|
| 12 | </p></li><li class="listitem"><p>convert between 64 and 32 bit LTDBs where the CTDB record
|
|---|
| 13 | headers differ by 4 bytes of padding.
|
|---|
| 14 | </p></li></ul></div></div><div class="refsect1"><a name="idp52740656"></a><h2>OPTIONS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-e</span></dt><dd><p>
|
|---|
| 15 | Dump empty records. These are normally excluded.
|
|---|
| 16 | </p></dd><dt><span class="term">-p</span></dt><dd><p>
|
|---|
| 17 | Dump with header information, similar to "ctdb catdb".
|
|---|
| 18 | </p></dd><dt><span class="term">
|
|---|
| 19 | -s
|
|---|
| 20 | { 0 | 32 | 64 }
|
|---|
| 21 | </span></dt><dd><p>
|
|---|
| 22 | Specify how to determine the CTDB record header size
|
|---|
| 23 | for the input database:
|
|---|
| 24 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">0</span></dt><dd><p>no CTDB header</p></dd><dt><span class="term">32</span></dt><dd><p>CTDB header size of a 32 bit system (20 bytes)</p></dd><dt><span class="term">64</span></dt><dd><p>CTDB header size of a 64 bit system (24 bytes)</p></dd></dl></div><p>
|
|---|
| 25 | The default is 32 or 64 depending on the system architecture.
|
|---|
| 26 | </p></dd><dt><span class="term">
|
|---|
| 27 | -o
|
|---|
| 28 | { 0 | 32 | 64 }
|
|---|
| 29 | </span></dt><dd><p>
|
|---|
| 30 | Specify how to determine the CTDB record header size
|
|---|
| 31 | for the output database, see -s.
|
|---|
| 32 | </p></dd><dt><span class="term">-S <em class="parameter"><code>SIZE</code></em></span></dt><dd><p>
|
|---|
| 33 | Explicitly specify the CTDB record header SIZE of the
|
|---|
| 34 | input database in bytes.
|
|---|
| 35 | </p></dd><dt><span class="term">-O <em class="parameter"><code>SIZE</code></em></span></dt><dd><p>
|
|---|
| 36 | Explicitly specify the CTDB record header SIZE for the
|
|---|
| 37 | output database in bytes.
|
|---|
| 38 | </p></dd><dt><span class="term">-h</span></dt><dd><p>
|
|---|
| 39 | Print help text.
|
|---|
| 40 | </p></dd></dl></div></div><div class="refsect1"><a name="idp53957568"></a><h2>COMMANDS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">help</span></dt><dd><p>
|
|---|
| 41 | Print help text.
|
|---|
| 42 | </p></dd><dt><span class="term">dump <em class="parameter"><code>IDB</code></em></span></dt><dd><p>
|
|---|
| 43 | Dump the contents of an LTDB input file IDB to standard
|
|---|
| 44 | output in a human-readable format.
|
|---|
| 45 | </p></dd><dt><span class="term">
|
|---|
| 46 | convert <em class="parameter"><code>IDB</code></em> <em class="parameter"><code>ODB</code></em>
|
|---|
| 47 | </span></dt><dd><p>
|
|---|
| 48 | Copy an LTDB input file IDB to output file ODB, optionally
|
|---|
| 49 | adding or removing CTDB headers.
|
|---|
| 50 | </p></dd></dl></div></div><div class="refsect1"><a name="idp49118400"></a><h2>EXAMPLES</h2><p>
|
|---|
| 51 | Print a local tdb in "tdbdump" style:
|
|---|
| 52 | </p><pre class="screen">
|
|---|
| 53 | ltdbtool dump idmap2.tdb.0
|
|---|
| 54 | </pre><p>
|
|---|
| 55 | Print a local tdb with header information similar to "ctdb catdb":
|
|---|
| 56 | </p><pre class="screen">
|
|---|
| 57 | ltdbtool dump -p idmap2.tdb.0
|
|---|
| 58 | </pre><p>
|
|---|
| 59 | Strip the CTDB headers from records:
|
|---|
| 60 | </p><pre class="screen">
|
|---|
| 61 | ltdbtool convert -o0 idmap2.tdb.0 idmap.tdb
|
|---|
| 62 | </pre><p>
|
|---|
| 63 | Strip 64 bit CTDB headers from records, running on i386:
|
|---|
| 64 | </p><pre class="screen">
|
|---|
| 65 | ltdbtool convert -s64 -o0 idmap2.tdb.0 idmap.tdb
|
|---|
| 66 | </pre><p>
|
|---|
| 67 | Strip the CTDB headers from records by piping through tdbrestore:
|
|---|
| 68 | </p><pre class="screen">
|
|---|
| 69 | ltdbtool dump idmap2.tdb.0 | tdbrestore idmap.tdb
|
|---|
| 70 | </pre><p>
|
|---|
| 71 | Convert a local tdb from a 64 bit system for usage on a 32 bit system:
|
|---|
| 72 | </p><pre class="screen">
|
|---|
| 73 | ltdbtool convert -s64 -o32 idmap2.tdb.0 idmap2.tdb.1
|
|---|
| 74 | </pre><p>
|
|---|
| 75 | Add a default header:
|
|---|
| 76 | </p><pre class="screen">
|
|---|
| 77 | ltdbtool convert -s0 idmap.tdb idmap2.tdb.0
|
|---|
| 78 | </pre></div><div class="refsect1"><a name="idp49126576"></a><h2>SEE ALSO</h2><p>
|
|---|
| 79 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span>,
|
|---|
| 80 |
|
|---|
| 81 | <span class="citerefentry"><span class="refentrytitle">tdbdump</span>(1)</span>,
|
|---|
| 82 |
|
|---|
| 83 | <span class="citerefentry"><span class="refentrytitle">tdbrestore</span>(1)</span>,
|
|---|
| 84 |
|
|---|
| 85 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>,
|
|---|
| 86 |
|
|---|
| 87 | <a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
|
|---|
| 88 | </p></div></div></body></html>
|
|---|