docs-xml: add dbwrap_tool.1 manual page
[obnox/samba/samba-obnox.git] / docs-xml / manpages / dbwrap_tool.1.xml
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">
4
5 <refmeta>
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>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>dbwrap_tool</refname>
16         <refpurpose>low level TDB/CTDB manipulation tool using the dbwrap interface</refpurpose>
17 </refnamediv>
18
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>dbwrap_tool</command>
22                 <arg choice="req">&lt;database&gt;</arg>
23                 <arg choice="req">&lt;operation&gt;</arg>
24                 <arg choice="opt">&lt;key&gt;
25                         <arg choice="opt">&lt;type&gt;
26                                 <arg choice="opt">&lt;value&gt;</arg>
27                         </arg>
28                 </arg>
29         </cmdsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33         <title>DESCRIPTION</title>
34
35         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
36         <manvolnum>7</manvolnum></citerefentry> suite.</para>
37
38         <para>The dbwrap_tool program is used to read and manipulate
39         TDB/CTDB databases using the dbwrap interface.</para>
40
41         <para>The following database operations are available:
42         <itemizedlist>
43                 <listitem><para>fetch: fetch a record</para></listitem>
44                 <listitem><para>store: create or modify a record</para></listitem>
45                 <listitem><para>delete: remove a record</para></listitem>
46                 <listitem><para>erase: remove all records</para></listitem>
47                 <listitem><para>listkeys: list all available records</para></listitem>
48                 <listitem><para>listwatchers: list processes, which are waiting for changes in a record</para></listitem>
49         </itemizedlist>
50         </para>
51         <para>The following types are available:
52         <itemizedlist>
53                 <listitem><para>int32: signed 32bit integer</para></listitem>
54                 <listitem><para>uint32: unsigned 32bit integer</para></listitem>
55                 <listitem><para>string: "hello world"</para></listitem>
56                 <listitem><para>hex: hex strings like "68656C6C6F20776F726C6400" ("hello world")</para></listitem>
57         </itemizedlist>
58         </para>
59 </refsect1>
60
61 <refsect1>
62         <title>OPTIONS</title>
63
64         <para>None.</para>
65         <!--
66         <variablelist>
67         </variablelist>
68         -->
69 </refsect1>
70
71 <refsect1>
72         <title>COMMANDS</title>
73         <refsect2>
74                 <title>fetch</title>
75                 <cmdsynopsis>
76                         <command>dbwrap_tool</command> &lt;database&gt; fetch &lt;key&gt; &lt;type&gt;
77                 </cmdsynopsis>
78         </refsect2>
79         <refsect2>
80                 <title>store</title>
81                 <cmdsynopsis>
82                         <command>dbwrap_tool</command> &lt;database&gt; store &lt;key&gt; &lt;type&gt; &lt;value&gt;
83                 </cmdsynopsis>
84         </refsect2>
85         <refsect2>
86                 <title>delete</title>
87                 <cmdsynopsis>
88                         <command>dbwrap_tool</command> &lt;database&gt; delete &lt;key&gt;
89                 </cmdsynopsis>
90         </refsect2>
91         <refsect2>
92                 <title>erase</title>
93                 <cmdsynopsis>
94                         <command>dbwrap_tool</command> &lt;database&gt; erase </cmdsynopsis>
95         </refsect2>
96         <refsect2>
97                 <title>listkeys</title>
98                 <cmdsynopsis>
99                         <command>dbwrap_tool</command> &lt;database&gt; listkeys
100                 </cmdsynopsis>
101         </refsect2>
102         <refsect2>
103                 <title>listwatchers</title>
104                 <cmdsynopsis>
105                         <command>dbwrap_tool</command> &lt;database&gt; listwatchers
106                 </cmdsynopsis>
107         </refsect2>
108 </refsect1>
109
110 <refsect1>
111         <title>EXAMPLES</title>
112         <variablelist>
113                 <varlistentry><term>List all keys from winbindd_idmap.tdb</term>
114                         <listitem><para><command>dbwrap_tool</command> winbindd_idmap.tdb listkeys</para></listitem>
115                 </varlistentry>
116                 <varlistentry><term>Fetch record with key "USER HWM" as uint32</term>
117                         <listitem><para><command>dbwrap_tool</command> winbindd_idmap.tdb fetch "USER HWM" uint32</para></listitem>
118                 </varlistentry>
119                 <varlistentry><term>Remove record with key "USER HWM"</term>
120                         <listitem><para><command>dbwrap_tool</command> winbindd_idmap.tdb remove "USER HWM"</para></listitem>
121                 </varlistentry>
122                 <varlistentry><term>Store and overwrite record "USER HWM" with value 214</term>
123                         <listitem><para>uint32: <command>dbwrap_tool</command> winbindd_idmap.tdb store "USER HWM" uint32 214</para></listitem>
124                         <listitem><para>hex: <command>dbwrap_tool</command> winbindd_idmap.tdb store "USER HWM" hex D6000000</para></listitem>
125                 </varlistentry>
126         </variablelist>
127 </refsect1>
128
129 <refsect1>
130         <title>NOTES</title>
131
132         <para>Use with caution!</para>
133 </refsect1>
134
135
136 <refsect1>
137         <title>VERSION</title>
138
139         <para>This man page is correct for version 3 of the Samba suite.</para>
140 </refsect1>
141
142 <refsect1>
143         <title>SEE ALSO</title>
144         <para><citerefentry><refentrytitle>smbd</refentrytitle>
145         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>samba</refentrytitle>
146         <manvolnum>7</manvolnum></citerefentry></para>
147 </refsect1>
148
149 <refsect1>
150         <title>AUTHOR</title>
151
152         <para>The original Samba software and related utilities
153         were created by Andrew Tridgell. Samba is now developed
154         by the Samba Team as an Open Source project similar
155         to the way the Linux kernel is developed.</para>
156
157         <para>The dbwrap_tool manpage was written by Bjoern Baumbach.</para>
158 </refsect1>
159
160 </refentry>