Save all databases in seperate files #393
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#393
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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'm trying to do and why
I would like to save databases using the
name: all
feature in different files. This would allow deletion (and extraction) of seperate databases.I need to backup a mariadb server with around 200 databases and growing. I currently use borgmatic to backup all databases using the
name: all
feature. Borgmatic creates a single file.borgmatic/mysql_databases/db_server/all
. I would like to be able to delete a single database from all archives (using borg recreate). Therefor I need all databases in seperate paths.Other notes / implementation ideas
In order to keep backwards compatibility this could by implemented using a config flag like
seperate_files: true
or by using a different keywordname: all_seperated
.Environment
borgmatic version: 1.5.10
borgmatic installation method: Docker
Borg version: 1.1.3
Python version: 3.6.8
Database version (if applicable): mariadb 10.5.9
Seconded. I'd be willing to contribute a patch if we find an agreement on what the configuration should look like. I like introducing
name: all_separated
.I have exactly the same use case with PostgreSQL. For various historical reasons, my database sizes vary a lot as well, some store files with multiple GiB each, while others are somewhat small. All manual processes would benefit a lot if I was able to access only those files for individual databases of interest.
Additionally, it might even improve compression and de-duplication to "group" only that data which belongs together, regardless of any other. Would be great if
pg_dumpall
simply had such a feature already, so that BorgMatic would only need to forward some arguments, but that doesn't seem to be the case. Other people with similar use cases seem to simply split created dump files afterwards. While that might be an idea for a hook in BorgMatic, I gues it's difficult to implement with the streaming approach of database dumps, temporarily consumes more space etc.This has been implemented in borgmatic 1.7.6! To enable it, add a
format
option to your "all" database configuration. Then borgmatic will create individual dump files per database. See the documentation for more information: https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#all-databases