@@ -135,7 +135,7 @@ or -o <mongodump --out>` option:
135
135
136
136
.. code-block:: sh
137
137
138
- mongodump --out=/data /backup/
138
+ mongodump --out=/opt /backup/mongodump-1
139
139
140
140
To limit the amount of data included in the database dump, you can
141
141
specify :option:`--db <mongodump --db>` and
@@ -181,7 +181,12 @@ Consider the following example:
181
181
182
182
.. code-block:: sh
183
183
184
- mongodump --host=mongodb1.example.net --port=3017 --username=user --password="pass" --out=/opt/backup/mongodump-2013-10-24
184
+ mongodump \
185
+ --host=mongodb1.example.net \
186
+ --port=3017 \
187
+ --username=user \
188
+ --password="pass" \
189
+ --out=/opt/backup/mongodump-1
185
190
186
191
On any :binary:`~bin.mongodump` command you may, as above, specify username
187
192
and password credentials to specify database authentication.
@@ -226,6 +231,7 @@ To use :binary:`~bin.mongorestore` to connect to an active
226
231
:binary:`~bin.mongod`, use a command with the following prototype form:
227
232
228
233
.. code-block:: sh
234
+ :copyable: false
229
235
230
236
mongorestore --port=<port number> <path to the backup>
231
237
@@ -234,10 +240,10 @@ Consider the following example:
234
240
235
241
.. code-block:: sh
236
242
237
- mongorestore dump-2013-10-25/
243
+ mongorestore /opt/backup/mongodump-1
238
244
239
245
Here, :binary:`~bin.mongorestore` imports the database backup in
240
- the :file:`dump-2013-10-25 ` directory to the :binary:`~bin.mongod` instance
246
+ the :file:`/opt/backup/mongodump-1 ` directory to the :binary:`~bin.mongod` instance
241
247
running on the localhost interface on the default port ``27017``.
242
248
243
249
.. _backup-restore-oplogreplay:
@@ -286,4 +292,10 @@ prompt for the password:
286
292
287
293
.. code-block:: sh
288
294
289
- mongorestore --host=mongodb1.example.net --port=3017 --username=user --authenticationDatabase=admin /opt/backup/mongodump-2013-10-24
295
+ mongorestore \
296
+ --host=mongodb1.example.net \
297
+ --port=3017 \
298
+ --username=user \
299
+ --authenticationDatabase=admin \
300
+ /opt/backup/mongodump-1
301
+
0 commit comments