stefanprodan / mgob

MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
MIT License
769 stars 152 forks source link

How to manage dynamic backup scenarios ? #119

Closed claustres closed 1 year ago

claustres commented 4 years ago

Our use case is that we have a multi-tenant application where each customer has its own database. Theses databases are dynamically created/removed as customer accounts are.

As far as I can see we can add custom parameters to mongodump as static options in the backup plan file. This works fine as long as you know in advance which database to backup and it does not change dynamically. However in our use case we only know that information at run time when the backup occurs and it requires some DB queries to identify the target databases.

We wonder if we could address this issue already or how it would be possible from a design/architecture point of view if it is a feature the community would like to add (we could possibly help although we are not Go experts !). Maybe by allowing a custom user script to be run to perform the backup instead of hard-coded mongodump command ? Maybe by allowing some kind of plugins to customise the behaviour of your software ?

Thanks in advance for your feedback and also for sharing this work.