~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/mongooplog.1

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-27 15:40:16 UTC
  • Revision ID: package-import@ubuntu.com-20130827154016-xrafijucy0hpuxkd
Tags: 1:2.4.6-0ubuntu3
debian/*: Drop upstream debian changes accidentally merged in
1:2.4.6-0ubuntu1. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "MONGOOPLOG" "1" "March 14, 2013" "2.2.3" "mongodb-manual"
2
 
.SH NAME
3
 
mongooplog \- MongoDB
4
 
.
5
 
.nr rst2man-indent-level 0
6
 
.
7
 
.de1 rstReportMargin
8
 
\\$1 \\n[an-margin]
9
 
level \\n[rst2man-indent-level]
10
 
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11
 
-
12
 
\\n[rst2man-indent0]
13
 
\\n[rst2man-indent1]
14
 
\\n[rst2man-indent2]
15
 
..
16
 
.de1 INDENT
17
 
.\" .rstReportMargin pre:
18
 
. RS \\$1
19
 
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
 
. nr rst2man-indent-level +1
21
 
.\" .rstReportMargin post:
22
 
..
23
 
.de UNINDENT
24
 
. RE
25
 
.\" indent \\n[an-margin]
26
 
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
 
.nr rst2man-indent-level -1
28
 
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
 
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
 
..
31
 
.\" Man page generated from reStructuredText.
32
 
.
33
 
.sp
34
 
New in version 2.2.
35
 
.SH SYNOPSIS
36
 
.sp
37
 
\fI\%mongooplog\fP is a simple tool that polls operations from
38
 
the \fIreplication\fP \fIoplog\fP of a remote server, and applies
39
 
them to the local server. This capability supports certain classes of
40
 
real\-time migrations that require that the source server remain online
41
 
and in operation throughout the migration process.
42
 
.sp
43
 
Typically this command will take the following form:
44
 
.sp
45
 
.nf
46
 
.ft C
47
 
mongooplog  \-\-from mongodb0.example.net \-\-host mongodb1.example.net
48
 
.ft P
49
 
.fi
50
 
.sp
51
 
This command copies oplog entries from the \fBmongod\fP instance
52
 
running on the host \fBmongodb0.example.net\fP and duplicates
53
 
operations to the host \fBmongodb1.example.net\fP. If you do not need
54
 
to keep the \fI\%--from\fP host running during
55
 
the migration, consider using \fBmongodump\fP and
56
 
\fBmongorestore\fP or another \fBbackup\fP operation, which may be better suited to
57
 
your operation.
58
 
.IP Note
59
 
If the \fBmongod\fP instance specified by the \fI\%--from\fP
60
 
argument is running with \fBauthentication\fP, then
61
 
\fI\%mongooplog\fP will not be able to copy oplog entries.
62
 
.RE
63
 
.IP "See also"
64
 
.sp
65
 
\fBmongodump\fP, \fBmongorestore\fP,
66
 
"\fB/administration/backups\fP", "\fIOplog Internals Overview\fP", and "\fIReplica Set Oplog Sizing\fP".
67
 
.RE
68
 
.SH OPTIONS
69
 
.INDENT 0.0
70
 
.TP
71
 
.B mongooplog
72
 
.UNINDENT
73
 
.INDENT 0.0
74
 
.TP
75
 
.B \-\-help
76
 
Returns a basic help and usage text.
77
 
.UNINDENT
78
 
.INDENT 0.0
79
 
.TP
80
 
.B \-\-verbose, \-v
81
 
Increases the amount of internal reporting returned on the command
82
 
line. Increase the verbosity with the \fB\-v\fP form by including the
83
 
option multiple times, (e.g. \fB\-vvvvv\fP.)
84
 
.UNINDENT
85
 
.INDENT 0.0
86
 
.TP
87
 
.B \-\-version
88
 
Returns the version of the \fI\%mongooplog\fP utility.
89
 
.UNINDENT
90
 
.INDENT 0.0
91
 
.TP
92
 
.B \-\-host <hostname><:port>, \-h
93
 
Specifies a resolvable hostname for the \fBmongod\fP instance
94
 
to which \fI\%mongooplog\fP will apply \fIoplog\fP operations
95
 
retrieved from the serve specified by the \fI\%--from\fP
96
 
option.
97
 
.sp
98
 
\fI\%mongooplog\fP assumes that all target  \fBmongod\fP
99
 
instances are accessible by way of port \fB27017\fP. You may,
100
 
optionally, declare an alternate port number as part of the
101
 
hostname argument.
102
 
.sp
103
 
You can always connect directly to a single \fBmongod\fP
104
 
instance by specifying the host and port number directly.
105
 
.sp
106
 
To connect to a replica set, you can specify the replica set seed
107
 
name, and a seed list of set members, in the following format:
108
 
.sp
109
 
.nf
110
 
.ft C
111
 
<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...
112
 
.ft P
113
 
.fi
114
 
.UNINDENT
115
 
.INDENT 0.0
116
 
.TP
117
 
.B \-\-port
118
 
Specifies the port number of the \fBmongod\fP instance where
119
 
\fI\%mongooplog\fP will apply \fIoplog\fP entries. Only
120
 
specify this option if the MongoDB instance that you wish to
121
 
connect to is not running on the standard port. (i.e. \fB27017\fP)
122
 
You may also specify a port number using the \fI\%--host\fP command.
123
 
.UNINDENT
124
 
.INDENT 0.0
125
 
.TP
126
 
.B \-\-ipv6
127
 
Enables IPv6 support that allows \fI\%mongooplog\fP to connect
128
 
to the MongoDB instance using an IPv6 network. All MongoDB programs
129
 
and processes, including \fI\%mongooplog\fP, disable IPv6
130
 
support by default.
131
 
.UNINDENT
132
 
.INDENT 0.0
133
 
.TP
134
 
.B \-\-ssl
135
 
New in version 2.4: MongoDB added support for SSL connections to \fBmongod\fP
136
 
instances in mongooplog.
137
 
.IP Note
138
 
SSL support in mongooplog is not compiled into the default
139
 
distribution of MongoDB. See \fB/administration/ssl\fP for more
140
 
information on SSL and MongoDB.
141
 
.sp
142
 
Additionally, mongooplog does not support connections to
143
 
\fBmongod\fP instances that require client certificate
144
 
validation.
145
 
.RE
146
 
.sp
147
 
Allows \fI\%mongooplog\fP to connect to \fBmongod\fP
148
 
instance over an SSL connection.
149
 
.UNINDENT
150
 
.INDENT 0.0
151
 
.TP
152
 
.B \-\-username <username>, \-u <username>
153
 
Specifies a username to authenticate to the MongoDB instance, if
154
 
your database requires authentication. Use in conjunction with the
155
 
\fI\%--password\fP option to supply a
156
 
password.
157
 
.UNINDENT
158
 
.INDENT 0.0
159
 
.TP
160
 
.B \-\-password <password>, \-p <password>
161
 
Specifies a password to authenticate to the MongoDB instance. Use
162
 
in conjunction with the \fI\%--username\fP
163
 
option to supply a username.
164
 
.sp
165
 
If you specify a \fI\%--username\fP
166
 
without the \fI\%--password\fP option, \fI\%mongooplog\fP will
167
 
prompt for a password interactively.
168
 
.UNINDENT
169
 
.INDENT 0.0
170
 
.TP
171
 
.B \-\-authenticationDatabase <dbname>
172
 
New in version 2.4.
173
 
.sp
174
 
Specifies the database that holds the user\(aqs (e.g
175
 
\fI\%--username\fP) credentials.
176
 
.sp
177
 
By default, \fI\%mongooplog\fP assumes that the database specified to the
178
 
\fI\-\-db\fP argument holds the user\(aqs credentials, unless you
179
 
specify \fI\%--authenticationDatabase\fP.
180
 
.sp
181
 
See \fBuserSource\fP,
182
 
\fB/reference/privilege\-documents\fP and
183
 
\fB/reference/user\-privileges\fP for more information about
184
 
delegated authentication in MongoDB.
185
 
.UNINDENT
186
 
.INDENT 0.0
187
 
.TP
188
 
.B \-\-authenticationMechanism <name>
189
 
New in version 2.4.
190
 
.sp
191
 
Specifies the authentication mechanism. By default, the
192
 
authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB
193
 
challenge/response authentication mechanism. In the MongoDB Subscriber Edition,
194
 
\fI\%mongooplog\fP also includes support for \fBGSSAPI\fP to handle
195
 
Kerberos authentication.
196
 
.sp
197
 
See \fB/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication\fP
198
 
for more information about Kerberos authentication.
199
 
.UNINDENT
200
 
.INDENT 0.0
201
 
.TP
202
 
.B \-\-dbpath <path>
203
 
Specifies a directory, containing MongoDB data files, to which
204
 
\fI\%mongooplog\fP will apply operations from the \fIoplog\fP
205
 
of the database specified with the \fI\%--from\fP
206
 
option.  When used, the \fI\%--dbpath\fP option enables
207
 
\fBmongo\fP to attach directly to local data files and write
208
 
data without a running \fBmongod\fP instance. To run with
209
 
\fI\%--dbpath\fP, \fI\%mongooplog\fP needs to restrict access
210
 
to the data directory: as a result, no \fBmongod\fP can be
211
 
access the same path while the process runs.
212
 
.UNINDENT
213
 
.INDENT 0.0
214
 
.TP
215
 
.B \-\-directoryperdb
216
 
Use the \fI\%--directoryperdb\fP in conjunction with the
217
 
corresponding option to \fBmongod\fP. This option allows
218
 
\fI\%mongooplog\fP to write to data files organized with each
219
 
database located in a distinct directory. This option is only
220
 
relevant when specifying the \fI\%--dbpath\fP option.
221
 
.UNINDENT
222
 
.INDENT 0.0
223
 
.TP
224
 
.B \-\-journal
225
 
Allows \fI\%mongooplog\fP operations to use the durability
226
 
\fIjournal\fP to ensure that the data files will
227
 
remain in a consistent state during the writing process. This
228
 
option is only relevant when specifying the \fI\%--dbpath\fP
229
 
option.
230
 
.UNINDENT
231
 
.INDENT 0.0
232
 
.TP
233
 
.B \-\-fields [field1[,field2]], \-f [field1[,field2]]
234
 
Specify a field or number fields to constrain which data
235
 
\fI\%mongooplog\fP will migrate. All other fields will be
236
 
\fIexcluded\fP from the migration. Comma separate a list of fields to
237
 
limit the applied fields.
238
 
.UNINDENT
239
 
.INDENT 0.0
240
 
.TP
241
 
.B \-\-fieldFile <file>
242
 
As an alternative to "\fI\%--fields\fP" the
243
 
\fI\%--fieldFile\fP option allows you to specify a file
244
 
(e.g. \fB<file>\fP) that holds a list of field names to \fIinclude\fP in
245
 
the migration. All other fields will be \fIexcluded\fP from the
246
 
migration. Place one field per line.
247
 
.UNINDENT
248
 
.INDENT 0.0
249
 
.TP
250
 
.B \-\-seconds <number>, \-s <number>
251
 
Specify a number of seconds of operations for \fI\%mongooplog\fP
252
 
to pull from the \fI\%remote host\fP. Unless
253
 
specified the default value is \fB86400\fP seconds, or 24 hours.
254
 
.UNINDENT
255
 
.INDENT 0.0
256
 
.TP
257
 
.B \-\-from <host[:port]>
258
 
Specify the host for \fI\%mongooplog\fP to retrieve \fIoplog\fP
259
 
operations from. \fI\%mongooplog\fP \fIrequires\fP this
260
 
option.
261
 
.sp
262
 
Unless you specify the \fI\%--host\fP option,
263
 
\fI\%mongooplog\fP will apply the operations collected with this
264
 
option to the oplog of the \fBmongod\fP instance running on
265
 
the localhost interface connected to port \fB27017\fP.
266
 
.UNINDENT
267
 
.INDENT 0.0
268
 
.TP
269
 
.B \-\-oplogns <namespace>
270
 
Specify a namespace in the \fI\%--from\fP
271
 
host where the oplog resides. The default value is
272
 
\fBlocal.oplog.rs\fP, which is the where \fIreplica set\fP members
273
 
store their operation log. However, if you\(aqve copied \fIoplog\fP
274
 
entries into another database or collection, use this option to
275
 
copy oplog entries stored in another location.
276
 
.sp
277
 
\fINamespaces\fP take the form of
278
 
\fB[database].[collection]\fP.
279
 
.UNINDENT
280
 
.SS Usage
281
 
.sp
282
 
Consider the following prototype \fI\%mongooplog\fP command:
283
 
.sp
284
 
.nf
285
 
.ft C
286
 
mongooplog  \-\-from mongodb0.example.net \-\-host mongodb1.example.net
287
 
.ft P
288
 
.fi
289
 
.sp
290
 
Here, entries from the \fIoplog\fP of the \fBmongod\fP running
291
 
on port \fB27017\fP. This only pull entries from the last 24 hours.
292
 
.sp
293
 
In the next command, the parameters limit this operation to only apply
294
 
operations to the database \fBpeople\fP in the collection \fBusage\fP on
295
 
the target host (i.e. \fBmongodb1.example.net\fP):
296
 
.sp
297
 
.nf
298
 
.ft C
299
 
mongooplog  \-\-from mongodb0.example.net \-\-host mongodb1.example.net \-\-database people \-\-collection usage
300
 
.ft P
301
 
.fi
302
 
.sp
303
 
This operation only applies oplog entries from the last 24 hours. Use
304
 
the \fI\%--seconds\fP argument to capture a
305
 
greater or smaller amount of time. Consider the following example:
306
 
.sp
307
 
.nf
308
 
.ft C
309
 
mongooplog  \-\-from mongodb0.example.net \-\-seconds 172800
310
 
.ft P
311
 
.fi
312
 
.sp
313
 
In this operation, \fI\%mongooplog\fP captures 2 full days of
314
 
operations. To migrate 12 hours of \fIoplog\fP entries, use the
315
 
following form:
316
 
.sp
317
 
.nf
318
 
.ft C
319
 
mongooplog  \-\-from mongodb0.example.net \-\-seconds 43200
320
 
.ft P
321
 
.fi
322
 
.sp
323
 
For the previous two examples, \fI\%mongooplog\fP migrates entries
324
 
to the \fBmongod\fP process running on the localhost interface
325
 
connected to the \fB27017\fP port. \fI\%mongooplog\fP can also
326
 
operate directly on MongoDB\(aqs data files if no \fBmongod\fP is
327
 
running on the \fItarget\fP host. Consider the following example:
328
 
.sp
329
 
.nf
330
 
.ft C
331
 
mongooplog  \-\-from mongodb0.example.net \-\-dbpath /srv/mongodb \-\-journal
332
 
.ft P
333
 
.fi
334
 
.sp
335
 
Here, \fI\%mongooplog\fP imports \fIoplog\fP operations from the
336
 
\fBmongod\fP host connected to port \fB27017\fP. This migrates
337
 
operations to the MongoDB data files stored in the \fB/srv/mongodb\fP
338
 
directory. Additionally \fI\%mongooplog\fP will use the durability
339
 
\fIjournal\fP to ensure that the data files remain in a consistent
340
 
state.
341
 
.SH AUTHOR
342
 
MongoDB Documentation Project
343
 
.SH COPYRIGHT
344
 
2011-2013, 10gen, Inc.
345
 
.\" Generated by docutils manpage writer.
346
 
.