Skip to content
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

DOCSP-38679 mongoexport consistency consideration #166

Merged
merged 6 commits into from
Jul 22, 2024
Merged
Changes from 2 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
18 changes: 17 additions & 1 deletion source/mongoexport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ or CSV export of data stored in a MongoDB instance.
Run ``mongoexport`` from the system command line, not the
:binary:`~bin.mongo` shell.

``mongoexport`` is not a tool for backing up deployments. If you want to
create a backup solution, see :ref:`manual-tutorial-backup-and-restore`.

.. seealso::

:binary:`~bin.mongoimport` which provides the corresponding
Expand Down Expand Up @@ -171,6 +174,16 @@ For more information on the options available, see :ref:`mongoexport-options`.
Connect to a Sharded Cluster
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. note::

To avoid data inconsistencies, pause the following actions on your
sharded cluster when you run ``mongoexport``.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sharded cluster when you run ``mongoexport``.
sharded cluster when you run ``mongoexport``:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed! Thank you!


- Cross-shard transactions
- Data definition language operations (operations that create and modify
collections)
- Chunk balancinng

To connect to a sharded cluster to export its data, you can either:

- Specify the hostname of the :binary:`~bin.mongos` instance in the
Expand Down Expand Up @@ -227,7 +240,10 @@ preference <replica-set-read-preference>`:

.. code-block:: sh

mongoexport --host="mongos0.example.com:27017" --readPreference='{mode: "secondary", tagSets: [ { "region": "east" } ]}' --collection=events --db=reporting --out=events.json [additional options]
mongoexport --host="mongos0.example.com:27017"
--readPreference='{mode: "secondary", tagSets: [ { "region": "east"
} ]}' --collection=events --db=reporting --out=events.json
[additional options]

.. _mongoexport-options:

Expand Down