-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcommand_line.html
342 lines (342 loc) · 23.9 KB
/
command_line.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiredTiger: WiredTiger command line utility</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="wiredtiger.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="LogoFinal-header.png" alt="WiredTiger" /></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
 <span id="projectnumber">Version 2.9.2</span>
</div>
<div id="projectbrief"><!-- 2.9.2 --></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="banner">
<a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
<a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li><a href="community.html"><span>Community</span></a></li>
<li><a href="license.html"><span>License</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('command_line.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">WiredTiger command line utility </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>WiredTiger includes a command line utility, <code>wt</code>.</p>
<h1><a class="anchor" id="util_global_synopsis"></a>
SYNOPSIS</h1>
<p><code>wt [-LRVv] [-C config] [-E secretkey ] [-h directory] command [command-specific arguments]</code></p>
<h1><a class="anchor" id="util_global_description"></a>
DESCRIPTION</h1>
<p>The <code>wt</code> tool is a command-line utility that provides access to various pieces of the WiredTiger functionality.</p>
<h1><a class="anchor" id="util_global_options"></a>
OPTIONS</h1>
<p>There are several global options:</p>
<dl class="section user"><dt>-C config</dt><dd>Specify configuration strings for the <a class="el" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database. ">wiredtiger_open</a> function. </dd></dl>
<dl class="section user"><dt>-E secretkey</dt><dd>Specify an encryption secret key for the <a class="el" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database. ">wiredtiger_open</a> function. </dd></dl>
<dl class="section user"><dt>-h directory</dt><dd>Specify a database home directory. </dd></dl>
<dl class="section user"><dt>-L</dt><dd>Forcibly turn off logging subsystem for debugging purposes. </dd></dl>
<dl class="section user"><dt>-R</dt><dd>Run recovery if the underlying database is configured to do so. </dd></dl>
<dl class="section user"><dt>-V</dt><dd>Display WiredTiger version and exit. </dd></dl>
<dl class="section user"><dt>-v</dt><dd>Set verbose output.</dd></dl>
<p>Unless otherwise described by a <code>wt</code> command, the <code>wt</code> tool exits zero on success and non-zero on error.</p>
<p>The <code>wt</code> tool supports several commands. If configured in the underlying database, some commands will run recovery when opening the database. If the user wants to force recovery on any command, use the <code>-R</code> option. In general, commands that modify the database or tables will run recovery by default and commands that only read data will not run recovery.</p>
<hr/>
<h1><a class="anchor" id="util_alter"></a>
wt alter</h1>
<p>Alter a table.</p>
<h2><a class="anchor" id="util_alter_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] alter uri configuration ...</code></p>
<p>The <code>uri</code> and <code>configuration</code> pairs may be specified to the <code>alter</code> command. These configuration pairs can be used to modify the configuration values from those passed to the <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a> call.</p>
<p>The <code>uri</code> part of the configuration pair should match only one of the objects being altered, but may be a prefix of the object being matched. For example, the following two sets of configuration pairs are equivalent in the case of altering a single table named <code>xxx</code>.</p>
<div class="fragment"><div class="line">table access_pattern_hint=sequential</div>
<div class="line">table:xxx access_pattern_hint=sequential</div>
</div><!-- fragment --><p>It's an error, however, to specify a matching prefix that matches more than a single object being altered.</p>
<p>Multiple <code>configuration</code> arguments may be specified. For example, the following two sets of configuration pairs are equivalent:</p>
<div class="fragment"><div class="line">table:xxx access_pattern_hint=random,cache_resident=<span class="keyword">false</span></div>
<div class="line">table:xxx access_pattern_hint=random table:xxx cache_resident=<span class="keyword">false</span></div>
</div><!-- fragment --><hr/>
<h1><a class="anchor" id="util_backup"></a>
wt backup</h1>
<p>Perform a backup of a database or set of data sources.</p>
<p>The <code>backup</code> command performs a backup of the database, copying the underlying files to a <code>specified</code> directory, which can be subsequently opened as a WiredTiger database. See <a class="el" href="backup.html">Backups</a> for more information, and <a class="el" href="security.html#file_permissions">File permissions</a> for specifics on the copied file permissions.</p>
<h2><a class="anchor" id="util_backup_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] backup [-t uri] directory</code></p>
<h2><a class="anchor" id="util_backup_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>backup</code> command:</p>
<dl class="section user"><dt>-t uri</dt><dd>By default, the <code>backup</code> command does a backup of the entire database; the <code>-t</code> option changes the <code>backup</code> command to do a backup of only the named data sources.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_compact"></a>
wt compact</h1>
<p>Compact a table.</p>
<p>The <code>compact</code> command attempts to rewrite the specified table to consume less disk space.</p>
<h2><a class="anchor" id="util_compact_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] compact uri</code></p>
<h2><a class="anchor" id="util_compact_options"></a>
Options</h2>
<p>The <code>compact</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_create"></a>
wt create</h1>
<p>Create a table.</p>
<p>The <code>create</code> command creates the specified <code>uri</code> with the specified configuration. It is equivalent to a call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a> with the specified string arguments.</p>
<h2><a class="anchor" id="util_create_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] create [-c config] uri</code></p>
<h2><a class="anchor" id="util_create_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>create</code> command:</p>
<dl class="section user"><dt>-c</dt><dd>Include a configuration string to be passed to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a>.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_drop"></a>
wt drop</h1>
<p>Drop a table.</p>
<p>The <code>drop</code> command drops the specified <code>uri</code>. It is equivalent to a call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#adf785ef53c16d9dcc77e22cc04c87b70" title="Drop (delete) an object. ">WT_SESSION::drop</a> with the "force" configuration argument.</p>
<h2><a class="anchor" id="util_drop_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] drop uri</code></p>
<h2><a class="anchor" id="util_drop_options"></a>
Options</h2>
<p>The <code>drop</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_dump"></a>
wt dump</h1>
<p>Export data in a text format.</p>
<p>The <code>dump</code> command outputs the specified table in a portable format which can be re-loaded into a new table using the <code>load</code> command.</p>
<p>See <a class="el" href="dump_formats.html">Dump Formats</a> for details of the dump file formats.</p>
<h2><a class="anchor" id="util_dump_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] dump [-jrx] [-c checkpoint] [-f output] uri</code></p>
<h2><a class="anchor" id="util_dump_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>dump</code> command:</p>
<dl class="section user"><dt>-c</dt><dd>By default, the <code>dump</code> command opens the most recent version of the data source; the <code>-c</code> option changes the <code>dump</code> command to open the named checkpoint.</dd></dl>
<dl class="section user"><dt>-f</dt><dd>By default, the <code>dump</code> command output is written to the standard output; the <code>-f</code> option re-directs the output to the specified file.</dd></dl>
<dl class="section user"><dt>-j</dt><dd>Dump in JSON (<a href="http://www.json.org">JavaScript Object Notation</a>) format.</dd></dl>
<dl class="section user"><dt>-r</dt><dd>Dump in reverse order, from largest key to smallest.</dd></dl>
<dl class="section user"><dt>-x</dt><dd>Dump all characters in a hexadecimal encoding (the default is to leave printable characters unencoded).</dd></dl>
<hr/>
<h1><a class="anchor" id="util_list"></a>
wt list</h1>
<p>List the tables in the database.</p>
<p>By default, the <code>list</code> command prints out the tables stored in the database. If a URI is specified as an argument, only information about that data source is printed.</p>
<h2><a class="anchor" id="util_list_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] list [-cv] [uri]</code></p>
<h2><a class="anchor" id="util_list_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>list</code> command:</p>
<dl class="section user"><dt>-c</dt><dd>If the <code>-c</code> option is specified, the data source's checkpoints are printed in a human-readable format.</dd></dl>
<dl class="section user"><dt>-v</dt><dd>If the <code>-v</code> option is specified, the data source's complete schema table value is printed.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_load"></a>
wt load</h1>
<p>Load a table from dump output.</p>
<p>The <code>load</code> command reads the standard input for data and loads it into a table, creating the table if it does not yet exist. The data should be the format produced by the <code>dump</code> command; see <a class="el" href="dump_formats.html">Dump Formats</a> for details.</p>
<p>By default, if the table already exists, data in the table will be overwritten by the new data (use the <code>-n</code> option to make an attempt to overwrite existing data return an error).</p>
<h2><a class="anchor" id="util_load_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] load [-ajn] [-f input] [-r name] [uri configuration ...]</code></p>
<h2><a class="anchor" id="util_load_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>load</code> command:</p>
<dl class="section user"><dt>-a</dt><dd>If the <code>-a</code> option is specified, record number keys in the input are ignored and the data is appended to the data source and assigned new record number keys. The <code>-a</code> option is only applicable when loading into a column store.</dd></dl>
<dl class="section user"><dt>-f</dt><dd>By default, the <code>load</code> command reads from the standard input; the <code>-f</code> option reads the input from the specified file.</dd></dl>
<dl class="section user"><dt>-j</dt><dd>Load input in the JSON (<a href="http://www.json.org">JavaScript Object Notation</a>) format that was created by the <code>dump -j</code> command.</dd></dl>
<dl class="section user"><dt>-n</dt><dd>By default, input data will overwrite existing data where the key/value pair already exists in the data source; the <code>-n</code> option causes the <code>load</code> command to fail if there's an attempt to overwrite already existing data.</dd></dl>
<dl class="section user"><dt>-r</dt><dd>By default, the <code>load</code> command uses the table name taken from the input; the <code>-r</code> option renames the data source.</dd></dl>
<p>Additionally, <code>uri</code> and <code>configuration</code> pairs may be specified to the <code>load</code> command. These configuration pairs can be used to modify the configuration values from the dump header passed to the <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#a358ca4141d59c345f401c58501276bbb" title="Create a table, column group, index or file. ">WT_SESSION::create</a> call.</p>
<p>The <code>uri</code> part of the configuration pair should match only one of the objects being loaded, but may be a prefix of the object being matched. For example, the following two sets of configuration pairs are equivalent in the case of loading a single table named <code>xxx</code>.</p>
<div class="fragment"><div class="line">table block_allocation=first</div>
<div class="line">table:xxx block_allocation=first</div>
</div><!-- fragment --><p>It's an error, however, to specify a matching prefix that matches more than a single object being loaded.</p>
<p>Multiple <code>configuration</code> arguments may be specified. For example, the following two sets of configuration pairs are equivalent:</p>
<div class="fragment"><div class="line">table:xxx block_allocation=first,prefix_compress=<span class="keyword">false</span></div>
<div class="line">table:xxx block_allocation=first table:xxx prefix_compress=<span class="keyword">false</span></div>
</div><!-- fragment --><hr/>
<h1><a class="anchor" id="util_loadtext"></a>
wt loadtext</h1>
<p>Load text into a table.</p>
<p>The <code>loadtext</code> command reads the standard input for text and loads it into a table. The input data should be printable characters, with newline delimiters for each key or value.</p>
<p>The <code>loadtext</code> command does not create the object if it does not yet exist.</p>
<p>In the case of inserting values into a column-store table, each value is appended to the table; in the case of inserting values into a row-store table, lines are handled in pairs, where the first line is the key and the second line is the value. If the row-store table already exists, data in the table will be overwritten by the new data.</p>
<h2><a class="anchor" id="util_loadtext_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] loadtext [-f input] uri</code></p>
<h2><a class="anchor" id="util_loadtext_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>loadtext</code> command:</p>
<dl class="section user"><dt>-f</dt><dd>By default, the <code>loadtext</code> command reads from the standard input; the <code>-f</code> option reads the input from the specified file.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_printlog"></a>
wt printlog</h1>
<p>Display the database log.</p>
<p>The <code>printlog</code> command outputs the database log.</p>
<h2><a class="anchor" id="util_printlog_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] printlog [-x] [-f output]</code></p>
<h2><a class="anchor" id="util_printlog_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>printlog</code> command:</p>
<dl class="section user"><dt>-f</dt><dd>By default, the <code>printlog</code> command output is written to the standard output; the <code>-f</code> option re-directs the output to the specified file.</dd></dl>
<dl class="section user"><dt>-x</dt><dd>Keys and value items in the log are printed in hex format in addition to the default string format.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_read"></a>
wt read</h1>
<p>Read records from a table.</p>
<p>The <code>read</code> command prints out the records associated with the specified keys from the specified data source. The data source must be configured with string or record number keys and string values.</p>
<p>The <code>read</code> command exits non-zero if a specified record is not found.</p>
<h2><a class="anchor" id="util_read_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] read uri key ...</code></p>
<h2><a class="anchor" id="util_read_options"></a>
Options</h2>
<p>The <code>read</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_rename"></a>
wt rename</h1>
<p>Rename a table.</p>
<p>The <code>rename</code> command renames the specified table.</p>
<h2><a class="anchor" id="util_rename_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] rename uri name</code></p>
<h2><a class="anchor" id="util_rename_options"></a>
Options</h2>
<p>The <code>rename</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_salvage"></a>
wt salvage</h1>
<p>Recover data from a corrupted table.</p>
<p>The <code>salvage</code> command salvages the specified data source, discarding any data that cannot be recovered. Underlying files are re-written in place, overwriting the original file contents.</p>
<h2><a class="anchor" id="util_salvage_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] salvage [-F force] uri</code></p>
<h2><a class="anchor" id="util_salvage_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>salvage</code> command:</p>
<dl class="section user"><dt>-F</dt><dd>By default, salvage will refuse to salvage tables that fail basic tests (for example, tables that don't appear to be in a WiredTiger format). The <code>-F</code> option forces the salvage of the table, regardless.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_stat"></a>
wt stat</h1>
<p>Display database or data source statistics.</p>
<p>The <code>stat</code> command outputs run-time statistics for the WiredTiger engine, or, if specified, for the URI on the command-line.</p>
<h2><a class="anchor" id="util_stat_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] stat [-f] [uri]</code></p>
<h2><a class="anchor" id="util_stat_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>stat</code> command:</p>
<dl class="section user"><dt>-f</dt><dd>Include only "fast" statistics in the output (equivalent to passing <code>statistics=(fast)</code>) to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#afb5b4a69c2c5cafe411b2b04fdc1c75d" title="Open a new cursor on a data source or duplicate an existing cursor. ">WT_SESSION::open_cursor</a>.</dd></dl>
<hr/>
<h1><a class="anchor" id="util_truncate"></a>
wt truncate</h1>
<p>Truncate a table, removing all data.</p>
<p>The <code>truncate</code> command truncates the specified <code>uri</code>. It is equivalent to a call to <a class="el" href="struct_w_t___s_e_s_s_i_o_n.html#ac2bad195e24710d52d730fe3a7c1756a" title="Truncate a file, table or cursor range. ">WT_SESSION::truncate</a> with no start or stop specified.</p>
<h2><a class="anchor" id="util_truncate_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] truncate uri</code></p>
<h2><a class="anchor" id="util_truncate_options"></a>
Options</h2>
<p>The <code>truncate</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_upgrade"></a>
wt upgrade</h1>
<p>Upgrade a table.</p>
<p>The <code>upgrade</code> command upgrades the specified table, exiting success if the data source is up-to-date, and failure if the data source cannot be upgraded.</p>
<h2><a class="anchor" id="util_upgrade_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] upgrade uri</code></p>
<h2><a class="anchor" id="util_upgrade_options"></a>
Options</h2>
<p>The <code>upgrade</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_verify"></a>
wt verify</h1>
<p>Check the structural integrity of a table.</p>
<p>The <code>verify</code> command verifies the specified table, exiting success if the data source is correct, and failure if the data source is corrupted.</p>
<h2><a class="anchor" id="util_verify_synopsis"></a>
Synopsis</h2>
<p><code>wt [-RVv] [-C config] [-E secretkey ] [-h directory] verify uri</code></p>
<h2><a class="anchor" id="util_verify_options"></a>
Options</h2>
<p>The <code>verify</code> command has no command-specific options.</p>
<hr/>
<h1><a class="anchor" id="util_write"></a>
wt write</h1>
<p>Write records to a table.</p>
<p>The <code>write</code> command stores records into the specified data source. The data source must be configured with string or record number keys and string values.</p>
<p>If the <code>write</code> command is called with the <code>-a</code> option, each command-line argument is a single value to be appended to the specified column-store data source. If the <code>write</code> command is not called with the <code>-a</code> option, the command-line arguments are key/value pairs.</p>
<p>Attempting to overwrite an already existing record will fail.</p>
<h2><a class="anchor" id="util_write_synopsis"></a>
Synopsis</h2>
<p><code> wt [-RVv] [-C config] [-E secretkey ] [-h directory] write -a uri value ... <br />
wt [-RVv] [-C config] [-E secretkey ] [-h directory] write [-o] uri key value ... </code></p>
<h2><a class="anchor" id="util_write_options"></a>
Options</h2>
<p>The following are command-specific options for the <code>write</code> command:</p>
<dl class="section user"><dt>-a</dt><dd>Append each value as a new record in the data source.</dd></dl>
<dl class="section user"><dt>-o</dt><dd>By default, attempting to overwrite an already existing record will fail. The <code>-o</code> option changes <code>write</code> to overwrite previously existing records. </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">Reference Guide</a></li>
<li class="footer">Copyright (c) 2008-2016 MongoDB, Inc. All rights reserved. Contact <a href="mailto:[email protected]">[email protected]</a> for more information.</li>
</ul>
</div>
</body>
</html>