Skip to content

Commit 469e1c3

Browse files
committed
DOCSP-12896 add note to --restoreDbUsersAndRoles for admin DB
1 parent 5dd983c commit 469e1c3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

source/reference/program/mongorestore.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,15 @@ Options
752752
Restore user and role definitions for the given database. See
753753
:doc:`/reference/system-roles-collection` and
754754
:doc:`/reference/system-users-collection` for more information.
755-
755+
756+
.. note::
757+
758+
The :option:`--restoreDbUsersAndRoles` option cannot be used if
759+
specifying the ``admin`` database to the :option:`--db
760+
<mongorestore --db>` option, and attempting to do so will result
761+
in an error. Restoring the ``admin`` database by specifying
762+
:option:`--db admin <mongorestore --db>` to
763+
:program:`mongorestore` already restores all users and roles.
756764

757765

758766
.. option:: --writeConcern <document>

0 commit comments

Comments
 (0)