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">
4 <refentryinfo><date>2015-04-25</date></refentryinfo>
7 <refentrytitle>tdbtool</refentrytitle>
8 <manvolnum>8</manvolnum>
9 <refmiscinfo class="source">Samba</refmiscinfo>
10 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
11 <refmiscinfo class="version">4.0</refmiscinfo>
16 <refname>tdbtool</refname>
17 <refpurpose>manipulate the contents TDB files</refpurpose>
23 <command>tdbtool</command>
27 <command>tdbtool</command>
28 <arg choice="opt">-l</arg>
30 <replaceable>TDBFILE</replaceable>
32 <arg rep="repeat" choice="opt">
33 <replaceable>COMMANDS</replaceable>
40 <title>DESCRIPTION</title>
42 <para>This tool is part of the
43 <citerefentry><refentrytitle>samba</refentrytitle>
44 <manvolnum>1</manvolnum></citerefentry> suite.</para>
46 <para><command>tdbtool</command> a tool for displaying and
47 altering the contents of Samba TDB (Trivial DataBase) files. Each
48 of the commands listed below can be entered interactively or
49 provided on the command line.</para>
54 <title>OPTIONS</title>
61 This options disables any locking, by passing TDB_NOLOCK
62 to tdb_open_ex(). Only use this for database files which
63 are not used by any other process! And also only if it is otherwise not
64 possible to open the database, e.g. databases which were created with
75 <title>COMMANDS</title>
80 <term><option>create</option>
81 <replaceable>TDBFILE</replaceable></term>
82 <listitem><para>Create a new database named
83 <replaceable>TDBFILE</replaceable>.
88 <term><option>open</option>
89 <replaceable>TDBFILE</replaceable></term>
90 <listitem><para>Open an existing database named
91 <replaceable>TDBFILE</replaceable>.
96 <term><option>erase</option></term>
97 <listitem><para>Erase the current database.
102 <term><option>dump</option></term>
103 <listitem><para>Dump the current database as strings.
108 <term><option>cdump</option></term>
109 <listitem><para>Dump the current database as connection records.
114 <term><option>keys</option></term>
115 <listitem><para>Dump the current database keys as strings.
120 <term><option>hexkeys</option></term>
121 <listitem><para>Dump the current database keys as hex values.
126 <term><option>info</option></term>
127 <listitem><para>Print summary information about the
133 <term><option>insert</option>
134 <replaceable>KEY</replaceable>
135 <replaceable>DATA</replaceable>
137 <listitem><para>Insert a record into the
143 <term><option>move</option>
144 <replaceable>KEY</replaceable>
145 <replaceable>TDBFILE</replaceable>
147 <listitem><para>Move a record from the
148 current database into <replaceable>TDBFILE</replaceable>.
153 <term><option>store</option>
154 <replaceable>KEY</replaceable>
155 <replaceable>DATA</replaceable>
157 <listitem><para>Store (replace) a record in the
163 <term><option>show</option>
164 <replaceable>KEY</replaceable>
166 <listitem><para>Show a record by key.
171 <term><option>delete</option>
172 <replaceable>KEY</replaceable>
174 <listitem><para>Delete a record by key.
179 <term><option>list</option>
181 <listitem><para>Print the current database hash table and free list.
186 <term><option>free</option>
188 <listitem><para>Print the current database and free list.
193 <term><option>!</option>
194 <replaceable>COMMAND</replaceable>
196 <listitem><para>Execute the given system command.
202 <option>first</option>
204 <listitem><para>Print the first record in the current database.
210 <option>next</option>
212 <listitem><para>Print the next record in the current database.
218 <option>check</option>
220 <listitem><para>Check the integrity of the current database.
226 <option>repack</option>
228 <listitem><para>Repack a database using a temporary file to remove fragmentation.
234 <option>quit</option>
236 <listitem><para>Exit <command>tdbtool</command>.
244 <title>CAVEATS</title>
245 <para>The contents of the Samba TDB files are private
246 to the implementation and should not be altered with
247 <command>tdbtool</command>.
252 <title>VERSION</title>
253 <para>This man page is correct for version 3.6 of the Samba suite.</para>
257 <title>AUTHOR</title>
259 <para> The original Samba software and related utilities were
260 created by Andrew Tridgell. Samba is now developed by the
261 Samba Team as an Open Source project similar to the way the
262 Linux kernel is developed.</para>