Skip to content

feat: back up several mongo databases in one run - #81

Open
BetoFandino wants to merge 1 commit into
mainfrom
JF/list_db_mongo_backup
Open

BetoFandino wants to merge 1 commit into
mainfrom
JF/list_db_mongo_backup

Conversation

@BetoFandino

Copy link
Copy Markdown
Contributor

Description

mongodump only takes a single --db, so mongo_backup could only ever dump one database when MONGO_BACKUP_ALL_DATABASES was false. Add MONGO_BACKUP_DATABASES, which takes any number of databases and runs one dump per entry, uploading one archive for each. MONGO_BACKUP_DATABASE keeps working and is read as a single element list.

An archive holding a single database is now named after it (_mongo_edxapp.gz), since storage_backups uploads by basename and every database would otherwise overwrite the same object. Archives taken with MONGO_BACKUP_ALL_DATABASES set to true keep the _mongo.gz name, so the inventories using it are unaffected.

mongo_restore reads that name through the new MONGO_RESTORE_ARCHIVE_NAME, and mongo_clone passes it so backup and restore keep pointing at the same file.

@BetoFandino
BetoFandino requested a review from a team August 31, 2026 23:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant