...
Dumping a v7.0.0 db with `mongodump` version `100.8.0` gives ```2023-08-21T09:18:15.777+0100 Failed: error creating intents to dump: error creating intents for database config: error getting collections for database `config`: (Unauthorized) not authorized on config to execute command { listCollections: 1, filter: {}, cursor: {}, lsid: { id: UUID("5552942c-94f3-4c0b-ac87-63c67b236814") } , $db: "config" }``` I believe this is expected as `mongodump`s [latest docs](https://www.mongodb.com/docs/database-tools/mongodump/#mongodb-server-compatibility) do not advertise support for the latest db version. Presumably this requires `mongodump` to be updated.
JIRAUSER1274755 commented on Tue, 17 Oct 2023 13:33:00 +0000: Hello! In regards to our mongodump documentation, I'll be talking with our tools team to see if an update is required. That said, as you have resolved the matter involving your backups, I'm going to close this issue. JIRAUSER1274791 commented on Fri, 25 Aug 2023 12:42:34 +0000: Hi Christopher, I have managed to get `mongodump` working. It seems that the roles `userAdminAnyDatabase` and `readWriteAnyDatabase ` do not give permission to use `mongodump`. So I ran `db.grantRolesToUser("admin",["backup"])` and now I can dump. As in my initial issue, the `mongodump` docs do not specify MongoDB v7.0.0 support although it is supported (https://www.mongodb.com/docs/database-tools/mongodump/#mongodb-server-compatibility) JIRAUSER1274791 commented on Thu, 24 Aug 2023 07:58:29 +0000: Hi Christopher, Thank you for your reply. Is the documentation simply out of date if it is working on your machine? In which case the issue may be isolated to me rather than a version problem. The DB only has one user, myself (`admin`), which is set to be an admin: ``` admin> db.getUsers() { users: [ { _id: 'admin.admin', userId: new UUID("9cbea00c-8cef-447b-84c6-003d475c1db8"), user: 'admin', db: 'admin', roles: [ { role: 'userAdminAnyDatabase', db: 'admin' }, { role: 'readWriteAnyDatabase', db: 'admin' } ], mechanisms: [ 'SCRAM-SHA-1', 'SCRAM-SHA-256' ] } ], ok: 1 } ``` I believe these admin roles are a superset of the `backup role` and shouldn't be an issue? Prior to migrating to Ubuntu 20.04 Mongo 7.0.0 I used MongoDB 6.0.6 on a mac which was able to run `mongodump` with `mongodump` version `100.7.2`. I'm not sure if this provides any insight Josh JIRAUSER1265262 commented on Wed, 23 Aug 2023 19:24:41 +0000: Hi joshkirk@duck.com, thanks for your report. I tested this myself on MongoDB 7.0.0 and Mongodump 100.8.0 for Ubuntu 20.04 using m to spin up a 3 node replicaset. I inserted some documents into the config database and in other databases, and did not run into a permissions error running mongodump locally. Some asks: This looks like a permissions error on the user used for mongodump. Can you confirm which permissions you are providing for the user running mongodump? For example, see our Built-in backup role. If your permissions are correct, can you also confirm whether you tested this on an older version? If so, when did it last work for you, and how did you run it? Christopher
Use `mongodump v100.8.0` on a db of version `7.0.0`