Skip to content

Commit 5fcf164

Browse files
authored
add note that restoreDbUsersAndRoles requires dumpDbUsersAndRoles (#182)
* add note that restoreDbUsersAndRoles requires dumpDbUsersAndRoles * How about spelling words correctly?
1 parent f5f8826 commit 5fcf164

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

source/mongorestore.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,13 @@ Options
725725

726726
.. note::
727727

728-
The :option:`--restoreDbUsersAndRoles` option cannot be used if
729-
specifying the ``admin`` database to the :option:`--db
730-
<mongorestore --db>` option, and attempting to do so will result
731-
in an error. Restoring the ``admin`` database by specifying
732-
:option:`--db admin <mongorestore --db>` to
733-
``mongorestore`` already restores all users and roles.
734-
728+
- You can only use ``--restoreDbUsersAndRoles`` on a database dump that
729+
was created with the :option:`--dumpDbUsersAndRoles` option.
735730

731+
- Restoring the ``admin`` database by specifying
732+
:option:`--db admin <mongorestore --db>` automatically restores all
733+
users and roles. You cannot use ``--restoreDbUsersAndRoles``
734+
on the ``admin`` database, and attempting to do so results in an error.
736735

737736
.. option:: --writeConcern=<document>
738737

0 commit comments

Comments
 (0)