Skip to content

Commit fca8509

Browse files
authored
(DOCSP-25137) Update the manual restore steps from a partial snapshot for sharded cluster (#1965)
* (DOCSP-25137) Updating instructions to accommodate namespace filtering. * (DOCSP-25137) Typo fixes * (DOCSP-25137) Wording change. * (DOCSP-25137) * (DOCSP-25137) * (DOCSP-25137) Fix link. * (DOCSP-25137) * (DOCSP-25137) * (DOCSP-25137) * (DOCSP-25137) Copy review * (DOCSP-25137)
1 parent c573e74 commit fca8509

File tree

1 file changed

+67
-8
lines changed

1 file changed

+67
-8
lines changed

source/includes/steps-restore-sharded-config-primary-from-backup.yaml

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,22 @@ content: |
5555
5656
To start the :binary:`mongod <bin.mongod>` using a
5757
configuration file, specify the
58-
:option:`--config <mongod --config>` option in the command
59-
line specifying the full path to the configuration file:
58+
:option:`--config <mongod --config>` option in the
59+
command line specifying the full path to the
60+
configuration file.
6061
6162
.. code-block:: bash
6263
6364
mongod --config /path/to/mongodb/mongod.conf
6465
66+
If you are restoring from a
67+
:mms-docs:`namespace-filtered </core/backup-preparations/#namespaces-filter>`
68+
snapshot, specify the ``--restore`` option.
69+
70+
.. code-block:: bash
71+
72+
mongod --config /path/to/mongod/mongod.conf --restore
73+
6574
If you have :binary:`mongod <bin.mongod>` configured to
6675
run as a system service, start it using the recommended
6776
process for your system service manager.
@@ -104,13 +113,22 @@ content: |
104113
105114
#. To start the :binary:`mongod <bin.mongod>` using a
106115
configuration file, specify the
107-
:option:`--config <mongod --config>` option in the command
108-
line specifying the full path to the configuration file:
116+
:option:`--config <mongod --config>` option in the
117+
command line specifying the full path to the
118+
configuration file.
109119
110120
.. code-block:: bash
111121
112122
mongod --config /path/to/mongodb/mongod.conf
113123
124+
If restoring from a
125+
:mms-docs:`namespace-filtered </core/backup-preparations/#namespaces-filter>`
126+
snapshot, also specify the ``--restore`` option.
127+
128+
.. code-block:: bash
129+
130+
mongod --config /path/to/mongod/mongod.conf --restore
131+
114132
.. note:: Cloud Manager or Ops Manager Only
115133
116134
@@ -143,8 +161,49 @@ content: |
143161
use local
144162
db.dropDatabase()
145163
---
146-
title: "For any planned or completed shard hostname or replica set name changes, update the metadata in ``config.shards`` ."
164+
title: "Insert the filtered file list into the local database."
147165
stepnum: 3
166+
ref: insert-filtered
167+
content: |
168+
169+
This step is only required if you are restoring from a
170+
namespace-filtered snapshot.
171+
172+
For each shard, locate the filtered file list with the following name
173+
format: ``<shardRsID>-filteredFileList.txt``. This file contains a
174+
list of JSON objects with the following format:
175+
176+
.. code-block:: javascript
177+
178+
{
179+
"filename":"file1",
180+
"ns":"sampleDb1.sampleCollection1",
181+
"uuid": "3b241101-e2bb-4255-8caf-4136c566a962"
182+
}
183+
184+
Add each JSON object from each shard file to a new
185+
``db.systems.collections_to_restore`` collection in your ``local``
186+
database. You can ignore entries with empty ``ns`` or ``uuid``
187+
fields. When inserting entries, the ``uuid`` field must be inserted
188+
as type :method:`UUID`.
189+
---
190+
title: "Run the filtered file restore command."
191+
stepnum: 4
192+
ref: run-filtered
193+
content: |
194+
195+
This step is only required if you are restoring from a
196+
namespace-filtered snapshot.
197+
198+
After inserting all entries, run the following commands:
199+
200+
.. code-block:: bash
201+
202+
use admin
203+
db.runCommand({"_configsvrRunRestore":1})
204+
---
205+
title: "For any planned or completed shard hostname or replica set name changes, update the metadata in ``config.shards``."
206+
stepnum: 4
148207
ref: metadata-update
149208
content: |
150209
@@ -220,7 +279,7 @@ content: |
220279
221280
---
222281
title: "Restart the :binary:`mongod <bin.mongod>` as a new single-node replica set."
223-
stepnum: 4
282+
stepnum: 5
224283
ref: restart-as-repl
225284
content: |
226285
@@ -259,7 +318,7 @@ replacement:
259318
260319
---
261320
title: "Initiate the new replica set."
262-
stepnum: 5
321+
stepnum: 6
263322
ref: initiate
264323
pre: |
265324
Initiate the replica set using :method:`rs.initiate()` with the
@@ -273,7 +332,7 @@ post: |
273332
that the member has become the :term:`primary <Primary>`.
274333
---
275334
title: "Add additional replica set members."
276-
stepnum: 6
335+
stepnum: 7
277336
ref: add-members
278337
content: |
279338

0 commit comments

Comments
 (0)