Database backups to multiple files #438
Loading…
x
Reference in New Issue
Block a user
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?
Allow doing database backup to multiple files, one for each database, instead of a single file when using all option.
This is particular usefull when having to do backups of multiple large databases, to better organize and simplify restoring single databases.
Something like:
This makes sense to me. But is the idea that, after this backup occurs, you'd like to be able to restore a single database manually outside of borgmatic? Or would you expect borgmatic to be able to restore a single database created in this manner? Or perhaps both?
Manually is already a given, since the file is on text mode, you can easilly extract the files and restore it yourself.
Using borgmatic to restore a single database would be a good feature, but, at least for me, its not as critical as having the files separated, because of the size and to simplify restoration of single databases manually.
Gotcha, thanks!
Same here, it would be wonderful if there would be a difference between "all" and "all-by-database". Right now I have a bash script that iterates over
/usr/bin/mysql -e 'show databases' -s --skip-column-names
to dump per-db files to circumvent this, would be cool if this was a borgmatic option.I do not see borgmatic responsible for a clean restore, just file backup and file restore, not db restore.
Giving more fuel to this request. As for now, a similar solution like @adrian's is in place, having this as an option included to Borgmatic would be great.
Agree on this too.
Proposed configuration for this:
The idea being that if a specified
format
is present in your configuration, then you're requesting individual files be dumped in that format instead of in a combined dump file. Similar approach would work for PostgreSQL.I'm open to feedback on this, of course!
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