1DBWRAP_TOOL(1)            System Administration tools           DBWRAP_TOOL(1)
2
3
4

NAME

6       dbwrap_tool - low level TDB/CTDB manipulation tool using the dbwrap
7       interface
8

SYNOPSIS

10       dbwrap_tool [-?|--help] [--usage] [--persistent] [--non-persistent]
11        [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout]
12        [--configfile=CONFIGFILE] [--option=name=value]
13        [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full]
14        {<database>} {<operation>} [<key> [<type> [<value>]]]
15

DESCRIPTION

17       This tool is part of the samba(7) suite.
18
19       The dbwrap_tool program is used to read and manipulate TDB/CTDB
20       databases using the dbwrap interface.
21
22       The following database operations are available:
23
24              •   fetch: fetch a record
25
26              •   store: create or modify a record
27
28              •   delete: remove a record
29
30              •   exists: test for existence of a record
31
32              •   erase: remove all records
33
34              •   listkeys: list all available records
35
36              •   listwatchers: list processes, which are waiting for changes
37                  in a record
38
39
40       The following types are available:
41
42              •   int32: signed 32bit integer
43
44              •   uint32: unsigned 32bit integer
45
46              •   string: "hello world"
47
48              •   hex: hex strings like "68656C6C6F20776F726C6400" ("hello
49                  world")
50
51

OPTIONS

53       --persistent
54           Open the database as a persistent database.
55
56           Exactly one of --persistent and --non-persistent must be specified.
57
58       --non-persistent
59           Open the database as a non-persistent database.
60
61           Caveat: opening a database as non-persistent when there is
62           currently no other opener will wipe the database.
63
64           Exactly one of --persistent and --non-persistent must be specified.
65
66       -?|--help
67           Print a summary of command line options.
68
69       --usage
70           Display brief usage message.
71
72       -d|--debuglevel=DEBUGLEVEL
73           level is an integer from 0 to 10. The default value if this
74           parameter is not specified is 1 for client applications.
75
76           The higher this value, the more detail will be logged to the log
77           files about the activities of the server. At level 0, only critical
78           errors and serious warnings will be logged. Level 1 is a reasonable
79           level for day-to-day running - it generates a small amount of
80           information about operations carried out.
81
82           Levels above 1 will generate considerable amounts of log data, and
83           should only be used when investigating a problem. Levels above 3
84           are designed for use only by developers and generate HUGE amounts
85           of log data, most of which is extremely cryptic.
86
87           Note that specifying this parameter here will override the log
88           level parameter in the smb.conf file.
89
90       --debug-stdout
91           This will redirect debug output to STDOUT. By default all clients
92           are logging to STDERR.
93
94       --configfile=<configuration file>
95           The file specified contains the configuration details required by
96           the client. The information in this file can be general for client
97           and server or only provide client specific like options such as
98           client smb encrypt. See smb.conf for more information. The default
99           configuration file name is determined at compile time.
100
101       --option=<name>=<value>
102           Set the smb.conf(5) option "<name>" to value "<value>" from the
103           command line. This overrides compiled-in defaults and options read
104           from the configuration file. If a name or a value includes a space,
105           wrap whole --option=name=value into quotes.
106
107       -l|--log-basename=logdirectory
108           Base directory name for log/debug files. The extension ".progname"
109           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
110           file is never removed by the client.
111
112       --leak-report
113           Enable talloc leak reporting on exit.
114
115       --leak-report-full
116           Enable full talloc leak reporting on exit.
117
118       -V|--version
119           Prints the program version number.
120

COMMANDS

122   fetch
123       dbwrap_tool <database> fetch <key> <type>
124
125   store
126       dbwrap_tool <database> store <key> <type> <value>
127
128   delete
129       dbwrap_tool <database> delete <key>
130
131   exists
132       dbwrap_tool <database> exists <key>
133
134   erase
135       dbwrap_tool <database> erase
136
137   listkeys
138       dbwrap_tool <database> listkeys
139
140   listwatchers
141       dbwrap_tool <database> listwatchers
142

EXAMPLES

144       List all keys from winbindd_idmap.tdb
145           dbwrap_tool --persistent winbindd_idmap.tdb listkeys
146
147       Fetch record with key "USER HWM" as uint32
148           dbwrap_tool --persistent winbindd_idmap.tdb fetch "USER HWM" uint32
149
150       Remove record with key "USER HWM"
151           dbwrap_tool --persistent winbindd_idmap.tdb remove "USER HWM"
152
153       Store and overwrite record "USER HWM" with value 214
154           uint32: dbwrap_tool --persistent winbindd_idmap.tdb store "USER
155           HWM" uint32 214 hex: dbwrap_tool --persistent winbindd_idmap.tdb
156           store "USER HWM" hex D6000000
157

NOTES

159       Use with caution!
160

VERSION

162       This man page is part of version 4.15.2 of the Samba suite.
163

SEE ALSO

165       smbd(8), samba(7)
166

AUTHOR

168       The original Samba software and related utilities were created by
169       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
170       Source project similar to the way the Linux kernel is developed.
171
172       The dbwrap_tool manpage was written by Bjoern Baumbach.
173
174
175
176Samba 4.15.2                      11/13/2021                    DBWRAP_TOOL(1)
Impressum