Skip to content
Closed
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
27 changes: 16 additions & 11 deletions source/tutorial/restore-sharded-cluster.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,26 @@ Procedure
#. Stop all :program:`mongos` and :program:`mongod` processes,
including all shards *and* all config servers.

#. If shard hostnames have changed, you must manually update the
``shards`` collection in the :ref:`config-database` to use the new
hostnames. Do the following:
Procedure
---------

#. Stop all :program:`mongos` and :program:`mongod` processes,
including all shards *and* all config servers.

# If shard hostnames have *not* changed, skip to step 3. Otherwise:

a. Start the three :ref:`config servers <sharding-config-server>` by
#. Restore the config database on each config server

b. Start the three :ref:`config servers <sharding-config-server>` by
issuing commands similar to the following, using values appropriate
to your configuration:

.. code-block:: sh

mongod --configsvr --dbpath /data/configdb --port 27019

#. Restore the :ref:`config-database` on each config server.

#. Start one :program:`mongos` instance.
#. Start one :program:`mongos` instance, making sure you have updated the
config string with the new configdb hostnames and ports

#. Update the :ref:`config-database` collection named ``shards`` to reflect the
new hostnames.
Expand All @@ -59,12 +64,12 @@ Procedure
- Data files for each :ref:`config server <sharding-config-server>`,
if you have not already done so in the previous step.

#. Restart all the :program:`mongos` instances.
#. Restart all the config servers :program:`mongod` instances.

#. Restart all the :program:`mongos` instances, making sure to use the updated config string.

#. Restart all the shard :program:`mongod` instances.

#. Restart all the config servers :program:`mongod` instances.

#. Connect to a :program:`mongos` instance from a :program:`mongo` shell
and use the :method:`db.printShardingStatus()` method to ensure
that the cluster is operational, as follows:
Expand Down