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.0</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">-d <debug level></arg>
24 <arg choice="opt">-s <config file></arg>
25 <arg choice="opt">-l <log file base></arg>
26 <arg choice="opt">-V</arg>
27 <arg choice="opt">--option=<name>=<value></arg>
28 <arg choice="req"><database></arg>
29 <arg choice="req"><operation></arg>
30 <arg choice="opt"><key>
31 <arg choice="opt"><type>
32 <arg choice="opt"><value></arg>
39 <title>DESCRIPTION</title>
41 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
42 <manvolnum>7</manvolnum></citerefentry> suite.</para>
44 <para>The dbwrap_tool program is used to read and manipulate
45 TDB/CTDB databases using the dbwrap interface.</para>
47 <para>The following database operations are available:
49 <listitem><para>fetch: fetch a record</para></listitem>
50 <listitem><para>store: create or modify a record</para></listitem>
51 <listitem><para>delete: remove 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.
74 If this option is not specified, the database is opened as
78 &popt.common.samba.client;
84 <title>COMMANDS</title>
88 <command>dbwrap_tool</command> <database> fetch <key> <type>
94 <command>dbwrap_tool</command> <database> store <key> <type> <value>
100 <command>dbwrap_tool</command> <database> delete <key>
106 <command>dbwrap_tool</command> <database> erase </cmdsynopsis>
109 <title>listkeys</title>
111 <command>dbwrap_tool</command> <database> listkeys
115 <title>listwatchers</title>
117 <command>dbwrap_tool</command> <database> listwatchers
123 <title>EXAMPLES</title>
125 <varlistentry><term>List all keys from winbindd_idmap.tdb</term>
126 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb listkeys</para></listitem>
128 <varlistentry><term>Fetch record with key "USER HWM" as uint32</term>
129 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb fetch "USER HWM" uint32</para></listitem>
131 <varlistentry><term>Remove record with key "USER HWM"</term>
132 <listitem><para><command>dbwrap_tool</command> --persistent winbindd_idmap.tdb remove "USER HWM"</para></listitem>
134 <varlistentry><term>Store and overwrite record "USER HWM" with value 214</term>
135 <listitem><para>uint32: <command>dbwrap_tool</command> --persistent winbindd_idmap.tdb store "USER HWM" uint32 214</para></listitem>
136 <listitem><para>hex: <command>dbwrap_tool</command> --persistent winbindd_idmap.tdb store "USER HWM" hex D6000000</para></listitem>
144 <para>Use with caution!</para>
149 <title>VERSION</title>
151 <para>This man page is correct for version 3 of the Samba suite.</para>
155 <title>SEE ALSO</title>
156 <para><citerefentry><refentrytitle>smbd</refentrytitle>
157 <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>samba</refentrytitle>
158 <manvolnum>7</manvolnum></citerefentry></para>
162 <title>AUTHOR</title>
164 <para>The original Samba software and related utilities
165 were created by Andrew Tridgell. Samba is now developed
166 by the Samba Team as an Open Source project similar
167 to the way the Linux kernel is developed.</para>
169 <para>The dbwrap_tool manpage was written by Bjoern Baumbach.</para>