I create a user with role "restore" in database "admin". This user is able to successfully restore a dumped database (mongodump => mongorestore).
However, with `mongorestore --drop --preserveUUID` it fails with error
Failed: <collection-name>: error creating collection <collection-name>: applyOps: (Unauthorized) not authorized on admin to execute command { applyOps:...
I'm not sure if this is a missing piece in documentation (https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-restore, https://www.mongodb.com/docs/database-tools/mongorestore) or problem with MongoDB server (using 4.4.14).
- is related to
-
SERVER-36263 Bypassing operation validation in applyOps should require special privilege
- Closed