@@ -135,7 +135,7 @@ or -o <mongodump --out>` option:
135135
136136.. code-block:: sh
137137
138- mongodump --out=/data /backup/
138+ mongodump --out=/opt /backup/mongodump-1
139139
140140To limit the amount of data included in the database dump, you can
141141specify :option:`--db <mongodump --db>` and
@@ -181,7 +181,12 @@ Consider the following example:
181181
182182.. code-block:: sh
183183
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
185190
186191On any :binary:`~bin.mongodump` command you may, as above, specify username
187192and password credentials to specify database authentication.
@@ -226,6 +231,7 @@ To use :binary:`~bin.mongorestore` to connect to an active
226231:binary:`~bin.mongod`, use a command with the following prototype form:
227232
228233.. code-block:: sh
234+ :copyable: false
229235
230236 mongorestore --port=<port number> <path to the backup>
231237
@@ -234,10 +240,10 @@ Consider the following example:
234240
235241.. code-block:: sh
236242
237- mongorestore dump-2013-10-25/
243+ mongorestore /opt/backup/mongodump-1
238244
239245Here, :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
241247running on the localhost interface on the default port ``27017``.
242248
243249.. _backup-restore-oplogreplay:
@@ -286,4 +292,10 @@ prompt for the password:
286292
287293.. code-block:: sh
288294
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