@@ -418,8 +418,8 @@ Database Export with mongodump
418
418
419
419
The :program: `mongodump ` utility performs a live backup the data, or
420
420
can work against an inactive set of database
421
- files. :program: `mongodump ` utility can create a dump for an entire
422
- server/database/collection (or part of a collection with a query,)
421
+ files. The :program: `mongodump ` utility can create a dump for an entire
422
+ server/database/collection (or part of a collection using of query,)
423
423
even when the database is running and active. If you run
424
424
:program: `mongodump ` without any arguments the command will connect to
425
425
the local database instance (e.g. ``127.0.0.1 `` or ``localhost ``) and
@@ -441,6 +441,8 @@ database named "``test``". :program:`mongodump` provides the
441
441
operation to use the operation log to take a point-in-time snapshot of
442
442
the database.
443
443
444
+ TODO: We need to explain how this works. Can help you on this tmrw.
445
+
444
446
If your MongoDB instance is not running, you can use the
445
447
":option: `--dbpath <mongodump --dbpath> `" option to specify the
446
448
location to your MongoDB instance's database files. :program: `mongodump `
@@ -469,15 +471,15 @@ and password credentials to specify database authentication.
469
471
Database Import with mongorestore
470
472
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
471
473
472
- The :program: `mongorestore ` restores a binary backup created by the
473
- :program: `mongodump ` utility . Consider the following example command:
474
+ The :program: `mongorestore ` utility restores a binary backup created by
475
+ :program: `mongodump `. Consider the following example command:
474
476
475
477
.. code-block :: sh
476
478
477
479
mongorestore dump-2011-10-25/
478
480
479
481
Here, :program: `mongorestore ` imports the database backup located in
480
- the ``dump-2011-10-25 `` directory to the :option: `` mongod ` instance
482
+ the ``dump-2011-10-25 `` directory to the :option: `mongod ` instance
481
483
running on the localhost interface. By default, :program: `mongorestore `
482
484
will look for a database dump in the "``dump/ ``" directory and restore
483
485
that. If you wish to restore to a non-default host, the
@@ -494,7 +496,7 @@ username and password credentials as above.
494
496
495
497
If you created your database dump using the :option: `--oplog
496
498
<mongodump --oplog> ` option to ensure a point-in-time snapshot, call
497
- :program: `mongorestore ` with the ":option: ` --oplogReplay <mongorestore
499
+ :program: `mongorestore ` with the ":option: `--oplogReplay <mongorestore
498
500
--oplogReplay> `" option as in the following example:
499
501
500
502
.. code-block :: sh
@@ -513,12 +515,15 @@ following example:
513
515
514
516
mongorestore --filter ' {"field": 1}'
515
517
516
- Here, :program: `mognorestore ` only adds documents to the database from
518
+ Here, :program: `mongorestore ` only adds documents to the database from
517
519
the dump located in the "``dump/ ``" folder *if * the documents have a
518
520
field name "``field ``" that holds a value of "``1 ``". Enclose the
519
521
filter in single quotes (e.g. "``' ``") to prevent the filter from
520
522
interacting with your shell environment.
521
523
524
+ TODO: You already referenced --dbpath option above, but this actually
525
+ seems more fleshed out..
526
+
522
527
If your MongoDB instance is not running, you can use the
523
528
":option: `mongorestore --dbpath `" option to specify the location to
524
529
your MongoDB instance's database files. :program: `mongorestore ` inserts
@@ -532,6 +537,8 @@ configuration. Consider the following example:
532
537
533
538
mognorestore --dbpath /srv/mongodb
534
539
540
+ TODO: third ref to --dbpath
541
+
535
542
If your MongoDB instance is not running, you can use the
536
543
":option: `--dbpath <mongorestore --dbpath> `" option to specify the
537
544
location to your MongoDB instance's database files. Consider using the
0 commit comments