[SERVER-80299] Cannot use mongodump on db v7.0.0 Created: 22/Aug/23 Updated: 17/Oct/23 Resolved: 17/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Josh Kirk | Assignee: | Alison Rhea Thorne |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Operating System: | ALL |
| Steps To Reproduce: | Use `mongodump v100.8.0` on a db of version `7.0.0` |
| Participants: |
| Description |
|
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. |
| Comments |
| Comment by Alison Rhea Thorne [ 17/Oct/23 ] | |||||||||||||||||||
|
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. | |||||||||||||||||||
| Comment by Josh Kirk [ 25/Aug/23 ] | |||||||||||||||||||
|
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) | |||||||||||||||||||
| Comment by Josh Kirk [ 24/Aug/23 ] | |||||||||||||||||||
|
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.
I believe these admin roles are a superset of the `backup role` and shouldn't be an issue?
Josh | |||||||||||||||||||
| Comment by Chris Kelly [ 23/Aug/23 ] | |||||||||||||||||||
|
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:
Christopher |