1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="dbwrap_tool.1">
6 <refentrytitle>dbwrap_tool</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">4.7</refmiscinfo>
15 <refname>dbwrap_tool</refname>
16 <refpurpose>low level TDB/CTDB manipulation tool using the dbwrap interface</refpurpose>
21 <command>dbwrap_tool</command>
22 <arg choice="opt">--persistent</arg>
23 <arg choice="opt">--non-persistent</arg>
24 <arg choice="opt">-d <debug level></arg>
25 <arg choice="opt">-s <config file></arg>
26 <arg choice="opt">-l <log file base></arg>
27 <arg choice="opt">-V</arg>
28 <arg choice="opt">--option=<name>=<value></arg>
29 <arg choice="req"><database></arg>
30 <arg choice="req"><operation></arg>
31 <arg choice="opt"><key>
32 <arg choice="opt"><type>
33 <arg choice="opt"><value></arg></arg></arg>
38 <title>DESCRIPTION</title>
40 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
41 <manvolnum>7</manvolnum></citerefentry> suite.</para>
43 <para>The dbwrap_tool program is used to read and manipulate
44 TDB/CTDB databases using the dbwrap interface.</para>
46 <para>The following database operations are available:
48 <listitem><para>fetch: fetch a record</para></listitem>
49 <listitem><para>store: create or modify a record</para></listitem>
50 <listitem><para>delete: remove a record</para></listitem>
51 <listitem><para>exists: test for existence of a record</para></listitem>
52 <listitem><para>erase: remove all records</para></listitem>
53 <listitem><para>listkeys: list all available records</para></listitem>
54 <listitem><para>listwatchers: list processes, which are waiting for changes in a record</para></listitem>
57 <para>The following types are available:
59 <listitem><para>int32: signed 32bit integer</para></listitem>
60 <listitem><para>uint32: unsigned 32bit integer</para></listitem>
61 <listitem><para>string: "hello world"</para></listitem>
62 <listitem><para>hex: hex strings like "68656C6C6F20776F726C6400" ("hello world")</para></listitem>
68 <title>OPTIONS</title>
72 <term>--persistent</term>
73 <listitem><para>Open the database as a persistent database.
76 Exactly one of --persistent and --non-persistent must be
81 <term>--non-persistent</term>
82 <listitem><para>Open the database as a non-persistent database.
85 Caveat: opening a database as non-persistent when there
86 is currently no other opener will wipe the database.
89 Exactly one of --persistent and --non-persistent must be
93 &popt.common.samba.client;
99 <title>COMMANDS</title>
103 <command>dbwrap_tool</command> <database> fetch <key> <type>
109 <command>dbwrap_tool</command> <database> store <key> <type> <value>
113 <title>delete</title>
115 <command>dbwrap_tool</command> <database> delete <key>
119 <title>exists</title>
121 <command>dbwrap_tool</command> <database> exists <key>
127 <command>dbwrap_tool</command> <database> erase </cmdsynopsis>
130 <title>listkeys</title>
132 <command>dbwrap_tool</command> <database> listkeys
136 <title>listwatchers</title>
138 <command>dbwrap_tool</command> <database> listwatchers
144 <title>EXAMPLES</title>
146 <varlistentry><term>List all keys from winbindd_idmap.tdb</term>
147 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb listkeys</para></listitem>
149 <varlistentry><term>Fetch record with key "USER HWM" as uint32</term>
150 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb fetch "USER HWM" uint32</para></listitem>
152 <varlistentry><term>Remove record with key "USER HWM"</term>
153 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb remove "USER HWM"</para></listitem>
155 <varlistentry><term>Store and overwrite record "USER HWM" with value 214</term>
156 <listitem><para>uint32: <command>dbwrap_tool</command> --persistent winbindd_idmap.tdb store "USER HWM" uint32 214</para></listitem>
157 <listitem><para>hex: <command>dbwrap_tool</command> --persistent winbindd_idmap.tdb store "USER HWM" hex D6000000</para></listitem>
165 <para>Use with caution!</para>
170 <title>VERSION</title>
172 <para>This man page is correct for version 3 of the Samba suite.</para>
176 <title>SEE ALSO</title>
177 <para><citerefentry><refentrytitle>smbd</refentrytitle>
178 <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>samba</refentrytitle>
179 <manvolnum>7</manvolnum></citerefentry></para>
183 <title>AUTHOR</title>
185 <para>The original Samba software and related utilities
186 were created by Andrew Tridgell. Samba is now developed
187 by the Samba Team as an Open Source project similar
188 to the way the Linux kernel is developed.</para>
190 <para>The dbwrap_tool manpage was written by Bjoern Baumbach.</para>