Add ignore database option, add possibility to configure list of db names #973
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#973
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'd like to do and why
Currently, It's not possible to simply ignore databases for backup when selecting
alldatabases.For MariaDB, setting
options: --ignore_database foodoes not work, as thealloption does not hand over--all-databasestom̀ariadb-dumpbut dumps each DB for it's own. The option works only with the--all-databasesparameter.Other notes / implementation ideas
It would also be nice to be able to configure a list of database names without requiring to configure
host,userandpasswordfor each DB. This makes borgmatic difficult to use for large database servers.IIRC, borgmatic dumps each database on its own so that it can filter out system databases from the "all" dump. Otherwise, trying to restore those system databases will fail upon restore.
But to support your use case, I can imagine borgmatic's config supporting an
ignore_nameslist, optionally set for any database with nameall. Then borgmatic could do the filtering out of ignored databases on its own.You could probably do this with a merge include today, but I'm not sure if even that would be convenient enough for you. It might look something like this:
And then
db_common.yamlcould contain:Another idea (not implemented today) is a syntax like the following:
Anyway, these
host/username/passwordideas may be best in a separate ticket.Thanks, I will try the inlude solution. It makes the configuration much shorter.
This is implemented in main and will be part of the next release! The new option is called
skip_namesand is implemented right now for both MariaDB and MySQL. Just add it to a given database config, and the value is a sequence of database names to ignore when dumping "all".Really happy to hear and cant wait to run the new release! Thanks a lot!
Released in borgmatic 2.0.10!