Skip to content

DOCS-1300 clarify that mongodump/mongorestore can be used with mongos #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions source/reference/mongodump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 </administration/backups>`. Use in
conjunction with :program:`mongorestore` to provide restore
functionality.
effective :doc:`backup strategy </administration/backups>`. 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

point in time backups of running sharded clusters are not possible (unless you stop the world in some sort of atomic way,) and we should avoid making it seem as if this isn't the case, or is easy...


.. 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
-------
Expand Down Expand Up @@ -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.

Expand Down
16 changes: 10 additions & 6 deletions source/reference/mongorestore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <upsert>`. 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 <upsert>`. If
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upserts are a special kind of update, and Scott (and others) have asked that we be clear that an upsert isn't a thing, so much as it a potential behavior of an update. so it doesn't really make sense to say "x doesn't perform an update or an update with a flag."

existing data with the same ``_id`` already exists on the target
database, :program:`mongorestore` will *not* replace it.

Expand Down