1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3 <refentry id="tdbtool.8">
6 <refentrytitle>tdbtool</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">4.0</refmiscinfo>
15 <refname>tdbtool</refname>
16 <refpurpose>manipulate the contents TDB files</refpurpose>
22 <command>tdbtool</command>
26 <command>tdbtool</command>
27 <arg choice="opt">-l</arg>
29 <replaceable>TDBFILE</replaceable>
31 <arg rep="repeat" choice="opt">
32 <replaceable>COMMANDS</replaceable>
39 <title>DESCRIPTION</title>
41 <para>This tool is part of the
42 <citerefentry><refentrytitle>samba</refentrytitle>
43 <manvolnum>1</manvolnum></citerefentry> suite.</para>
45 <para><command>tdbtool</command> a tool for displaying and
46 altering the contents of Samba TDB (Trivial DataBase) files. Each
47 of the commands listed below can be entered interactively or
48 provided on the command line.</para>
53 <title>OPTIONS</title>
60 This options disables any locking, by passing TDB_NOLOCK
61 to tdb_open_ex(). Only use this for database files which
62 are not used by any other process! And also only if it is otherwise not
63 possible to open the database, e.g. databases which were created with
74 <title>COMMANDS</title>
79 <term><option>create</option>
80 <replaceable>TDBFILE</replaceable></term>
81 <listitem><para>Create a new database named
82 <replaceable>TDBFILE</replaceable>.
87 <term><option>open</option>
88 <replaceable>TDBFILE</replaceable></term>
89 <listitem><para>Open an existing database named
90 <replaceable>TDBFILE</replaceable>.
95 <term><option>erase</option></term>
96 <listitem><para>Erase the current database.
101 <term><option>dump</option></term>
102 <listitem><para>Dump the current database as strings.
107 <term><option>cdump</option></term>
108 <listitem><para>Dump the current database as connection records.
113 <term><option>keys</option></term>
114 <listitem><para>Dump the current database keys as strings.
119 <term><option>hexkeys</option></term>
120 <listitem><para>Dump the current database keys as hex values.
125 <term><option>info</option></term>
126 <listitem><para>Print summary information about the
132 <term><option>insert</option>
133 <replaceable>KEY</replaceable>
134 <replaceable>DATA</replaceable>
136 <listitem><para>Insert a record into the
142 <term><option>move</option>
143 <replaceable>KEY</replaceable>
144 <replaceable>TDBFILE</replaceable>
146 <listitem><para>Move a record from the
147 current database into <replaceable>TDBFILE</replaceable>.
152 <term><option>store</option>
153 <replaceable>KEY</replaceable>
154 <replaceable>DATA</replaceable>
156 <listitem><para>Store (replace) a record in the
162 <term><option>show</option>
163 <replaceable>KEY</replaceable>
165 <listitem><para>Show a record by key.
170 <term><option>delete</option>
171 <replaceable>KEY</replaceable>
173 <listitem><para>Delete a record by key.
178 <term><option>list</option>
180 <listitem><para>Print the current database hash table and free list.
185 <term><option>free</option>
187 <listitem><para>Print the current database and free list.
192 <term><option>!</option>
193 <replaceable>COMMAND</replaceable>
195 <listitem><para>Execute the given system command.
201 <option>first</option>
203 <listitem><para>Print the first record in the current database.
209 <option>next</option>
211 <listitem><para>Print the next record in the current database.
217 <option>check</option>
219 <listitem><para>Check the integrity of the current database.
225 <option>repack</option>
227 <listitem><para>Repack a database using a temporary file to remove fragmentation.
233 <option>quit</option>
235 <listitem><para>Exit <command>tdbtool</command>.
243 <title>CAVEATS</title>
244 <para>The contents of the Samba TDB files are private
245 to the implementation and should not be altered with
246 <command>tdbtool</command>.
251 <title>VERSION</title>
252 <para>This man page is correct for version 3.6 of the Samba suite.</para>
256 <title>AUTHOR</title>
258 <para> The original Samba software and related utilities were
259 created by Andrew Tridgell. Samba is now developed by the
260 Samba Team as an Open Source project similar to the way the
261 Linux kernel is developed.</para>