realestatepilot / docker-restic-backupclient

Easy backups with docker and restic
MIT License
5 stars 5 forks source link

Added newer mongodump version via multi-staging build #9

Closed msiebke closed 2 years ago

msiebke commented 2 years ago

The current container only ships mongodump 3.x.x. I've added mongodump 4.4.15 from the official image. This makes it possible to dump from newer MongoDBs again (which are running version 4.x.x). Otherwise the dumps fail with the following message

Failed: error creating intents to dump: error creating intents for database config: error counting config.system.indexBuilds: (Unauthorized) not authorized on config to execute command { count: "system.indexBuilds", lsid: { id: UUID("4dda3c58-afd6-46aa-8d06-6663401c604e") },...

as described here https://www.mongodb.com/community/forums/t/user-with-root-role-cannot-access-config-database/9693/6

Added the option to choose between --dump_version 3 and 4 in mongodump.py.

Wrote about it in README.md.

tgruenert commented 2 years ago

LGTM. Thank you for this PR!