Debian Codegraph @

upstream/debian-unstable/man1/dbwrap_tool.1

raw
1 '\" t
2 .\" Title: dbwrap_tool
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: System Administration tools
7 .\" Source: Samba 4.24.3-Debian-4.24.3+dfsg-1
8 .\" Language: English
9 .\"
10 .TH "DBWRAP_TOOL" "1" "05/26/2026" "Samba 4\&.24\&.3\-Debian\-4\&.24\&.3+dfs" "System Administration tools"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 dbwrap_tool \- low level TDB/CTDB manipulation tool using the dbwrap interface
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 dbwrap_tool [\-?|\-\-help] [\-\-usage] [\-\-persistent] [\-\-non\-persistent] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] {<database>} {<operation>} [<key>\ [<type>\ [<value>]]]
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 The dbwrap_tool program is used to read and manipulate TDB/CTDB databases using the dbwrap interface\&.
42 .PP
43 The following database operations are available:
44 .RS
45 .sp
46 .RS 4
47 .ie n \{\
48 \h'-04'\(bu\h'+03'\c
49 .\}
50 .el \{\
51 .sp -1
52 .IP \(bu 2.3
53 .\}
54 fetch: fetch a record
55 .RE
56 .sp
57 .RS 4
58 .ie n \{\
59 \h'-04'\(bu\h'+03'\c
60 .\}
61 .el \{\
62 .sp -1
63 .IP \(bu 2.3
64 .\}
65 store: create or modify a record
66 .RE
67 .sp
68 .RS 4
69 .ie n \{\
70 \h'-04'\(bu\h'+03'\c
71 .\}
72 .el \{\
73 .sp -1
74 .IP \(bu 2.3
75 .\}
76 delete: remove a record
77 .RE
78 .sp
79 .RS 4
80 .ie n \{\
81 \h'-04'\(bu\h'+03'\c
82 .\}
83 .el \{\
84 .sp -1
85 .IP \(bu 2.3
86 .\}
87 exists: test for existence of a record
88 .RE
89 .sp
90 .RS 4
91 .ie n \{\
92 \h'-04'\(bu\h'+03'\c
93 .\}
94 .el \{\
95 .sp -1
96 .IP \(bu 2.3
97 .\}
98 erase: remove all records
99 .RE
100 .sp
101 .RS 4
102 .ie n \{\
103 \h'-04'\(bu\h'+03'\c
104 .\}
105 .el \{\
106 .sp -1
107 .IP \(bu 2.3
108 .\}
109 listkeys: list all available records
110 .RE
111 .sp
112 .RS 4
113 .ie n \{\
114 \h'-04'\(bu\h'+03'\c
115 .\}
116 .el \{\
117 .sp -1
118 .IP \(bu 2.3
119 .\}
120 listwatchers: list processes, which are waiting for changes in a record
121 .RE
122 .sp
123 .RE
124 .PP
125 The following types are available:
126 .RS
127 .sp
128 .RS 4
129 .ie n \{\
130 \h'-04'\(bu\h'+03'\c
131 .\}
132 .el \{\
133 .sp -1
134 .IP \(bu 2.3
135 .\}
136 int32: signed 32bit integer
137 .RE
138 .sp
139 .RS 4
140 .ie n \{\
141 \h'-04'\(bu\h'+03'\c
142 .\}
143 .el \{\
144 .sp -1
145 .IP \(bu 2.3
146 .\}
147 uint32: unsigned 32bit integer
148 .RE
149 .sp
150 .RS 4
151 .ie n \{\
152 \h'-04'\(bu\h'+03'\c
153 .\}
154 .el \{\
155 .sp -1
156 .IP \(bu 2.3
157 .\}
158 string: "hello world"
159 .RE
160 .sp
161 .RS 4
162 .ie n \{\
163 \h'-04'\(bu\h'+03'\c
164 .\}
165 .el \{\
166 .sp -1
167 .IP \(bu 2.3
168 .\}
169 hex: hex strings like "68656C6C6F20776F726C6400" ("hello world")
170 .RE
171 .sp
172 .RE
173 .SH "OPTIONS"
174 .PP
175 \-\-persistent
176 .RS 4
177 Open the database as a persistent database\&.
178 .sp
179 Exactly one of \-\-persistent and \-\-non\-persistent must be specified\&.
180 .RE
181 .PP
182 \-\-non\-persistent
183 .RS 4
184 Open the database as a non\-persistent database\&.
185 .sp
186 Caveat: opening a database as non\-persistent when there is currently no other opener will wipe the database\&.
187 .sp
188 Exactly one of \-\-persistent and \-\-non\-persistent must be specified\&.
189 .RE
190 .PP
191 \-?|\-\-help
192 .RS 4
193 Print a summary of command line options\&.
194 .RE
195 .PP
196 \-\-usage
197 .RS 4
198 Display brief usage message\&.
199 .RE
200 .PP
201 \-d|\-\-debuglevel=level
202 .RS 4
203 \fIlevel\fR
204 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
205 .sp
206 The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
207 .sp
208 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
209 .sp
210 Note that specifying this parameter here will override the
211 \m[blue]\fBlog level\fR\m[]
212 parameter in the
213 /etc/samba/smb\&.conf
214 file\&.
215 .RE
216 .PP
217 \-\-debug\-stdout
218 .RS 4
219 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
220 .RE
221 .PP
222 \-\-configfile=<configuration file>
223 .RS 4
224 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
225 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
226 /etc/samba/smb\&.conf
227 for more information\&. The default configuration file name is determined at compile time\&.
228 .RE
229 .PP
230 \-\-option=<name>=<value>
231 .RS 4
232 Set the
233 \fBsmb.conf\fR(5)
234 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
235 .RE
236 .PP
237 \-l|\-\-log\-basename=logdirectory
238 .RS 4
239 Base directory name for log/debug files\&. The extension
240 \fB"\&.progname"\fR
241 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
242 .RE
243 .PP
244 \-\-leak\-report
245 .RS 4
246 Enable talloc leak reporting on exit\&.
247 .RE
248 .PP
249 \-\-leak\-report\-full
250 .RS 4
251 Enable full talloc leak reporting on exit\&.
252 .RE
253 .PP
254 \-V|\-\-version
255 .RS 4
256 Prints the program version number\&.
257 .RE
258 .SH "COMMANDS"
259 .SS "fetch"
260 .HP \w'\ 'u
261 dbwrap_tool <database> fetch <key> <type>
262
263 .SS "store"
264 .HP \w'\ 'u
265 dbwrap_tool <database> store <key> <type> <value>
266
267 .SS "delete"
268 .HP \w'\ 'u
269 dbwrap_tool <database> delete <key>
270
271 .SS "exists"
272 .HP \w'\ 'u
273 dbwrap_tool <database> exists <key>
274
275 .SS "erase"
276 .HP \w'\ 'u
277 dbwrap_tool <database> erase
278 .SS "listkeys"
279 .HP \w'\ 'u
280 dbwrap_tool <database> listkeys
281
282 .SS "listwatchers"
283 .HP \w'\ 'u
284 dbwrap_tool <database> listwatchers
285
286 .SH "EXAMPLES"
287 .PP
288 List all keys from winbindd_idmap\&.tdb
289 .RS 4
290 dbwrap_tool
291 \-\-persistent winbindd_idmap\&.tdb listkeys
292 .RE
293 .PP
294 Fetch record with key "USER HWM" as uint32
295 .RS 4
296 dbwrap_tool
297 \-\-persistent winbindd_idmap\&.tdb fetch "USER HWM" uint32
298 .RE
299 .PP
300 Remove record with key "USER HWM"
301 .RS 4
302 dbwrap_tool
303 \-\-persistent winbindd_idmap\&.tdb remove "USER HWM"
304 .RE
305 .PP
306 Store and overwrite record "USER HWM" with value 214
307 .RS 4
308 uint32:
309 dbwrap_tool
310 \-\-persistent winbindd_idmap\&.tdb store "USER HWM" uint32 214
311 hex:
312 dbwrap_tool
313 \-\-persistent winbindd_idmap\&.tdb store "USER HWM" hex D6000000
314 .RE
315 .SH "NOTES"
316 .PP
317 Use with caution!
318 .SH "VERSION"
319 .PP
320 This man page is part of version 4\&.24\&.3\-Debian\-4\&.24\&.3+dfsg\-1 of the Samba suite\&.
321 .SH "SEE ALSO"
322 .PP
323 \fBsmbd\fR(8),
324 \fBsamba\fR(7)
325 .SH "AUTHOR"
326 .PP
327 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
328 .PP
329 The dbwrap_tool manpage was written by Bjoern Baumbach\&.