From 35bc5eb7ceecd22a118debc7a16242553bbd87bf Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Tue, 26 Mar 2013 17:17:04 -0400 Subject: [PATCH] DOCS-1300 clarify that mongodump/mongorestore can be used with mongos --- source/reference/mongodump.txt | 17 ++++++++++++----- source/reference/mongorestore.txt | 16 ++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/source/reference/mongodump.txt b/source/reference/mongodump.txt index 9ca786a89c4..c525418215a 100644 --- a/source/reference/mongodump.txt +++ b/source/reference/mongodump.txt @@ -13,13 +13,20 @@ Synopsis :program:`mongodump` is a utility for creating a binary export of the contents of a database. Consider using this utility as part an -effective :doc:`backup strategy `. Use in -conjunction with :program:`mongorestore` to provide restore -functionality. +effective :doc:`backup strategy `. Use +:program:`mongodump` in +conjunction with :program:`mongorestore` to restore databases. + +:program:`mongodump` can be used to dump from either +:program:`mongod` or :program:`mongos` instances. +Sharded clusters may require additional steps to ensure a point-in-time +backup of sharded collections. .. include:: /includes/note-mongodump-compatibility-2.2.rst -.. seealso:: ":program:`mongorestore`" and ":doc:`/administration/backups`". +.. seealso:: :program:`mongorestore`, + :doc:`/tutorial/backup-sharded-cluster-with-database-dumps` + and :doc:`/administration/backups`. Options ------- @@ -150,7 +157,7 @@ Options Specifies a directory where :program:`mongodump` will save the output of the database dump. To output the database dump to standard output, - specify a ``-`` rather than a path. + specify a ``-`` rather than a path. By default, :program:`mongodump` will save output files in a directory named ``dump`` in the current working directory. diff --git a/source/reference/mongorestore.txt b/source/reference/mongorestore.txt index 5c18bfd8ed1..8d92b9808c4 100644 --- a/source/reference/mongorestore.txt +++ b/source/reference/mongorestore.txt @@ -10,13 +10,17 @@ Synopsis -------- -The :program:`mongorestore` tool imports content from binary database -dump, created by :program:`mongodump` into a specific -database. :program:`mongorestore` can import content to an existing -database or create a new one. +The :program:`mongorestore` program imports data from a +:program:`mongodump` binary database dump. +You can use :program:`mongorestore` to create a new database or +to import into an existing database. -:program:`mongorestore` only performs inserts into the existing -database, and does not perform updates or :term:`upserts `. If +:program:`mongorestore` can be used to restore to either +:program:`mongod` or :program:`mongos` instances. + +If you restore to an existing database, +:program:`mongorestore` will only insert into the existing +database, and will not perform updates or :term:`upserts `. If existing data with the same ``_id`` already exists on the target database, :program:`mongorestore` will *not* replace it.