Why are "database hook" and "one_file_system" are linked together?
and yes, if I follow the "RTFM" approach, I would have saved a lot of time :-)
I moved a service (mailcow) from one host to an other and after that, my borgmatic backups are nearly empty (empty folder) but success.
I was clever enough to think thas related to the btrfs filesystem (old host was ext4).
So I looked and found the "one_file_system" option. But it did not change anything. Folders still empty in the borg repo.
After reading all lines of the manual, I saw its always "true" if a database hook is used. Bingo!
Changing that (disasble database hook), it looks like all is copied and the folders contain the data again.
But why is this linked together? And is there an option to have an database dump inside the borg repo and all data - without having all in the same btrfs subvolume?
And yes, I also think there could be some discussion if a btrfs subvolume should be treated as an other filesystem or not scnr
a still happy borg(matic) user
Yikes, nearly empty backups are not good!
But why is this linked together?
You can find the sordid history of that in the comments on #315! But the short of it is that because borgmatic sets
read_special when database hooks are enabled (to support streaming databases directly to Borg), it also needs to set
one_file_system to prevent hanging in many common use cases like backing up
And is there an option to have an database dump inside the borg repo and all data - without having all in the same btrfs subvolume?
Not all in one configuration file, currently. However, if you put your database dumps in one configuration file and your btrfs backups in another, then I believe that would allow borgmatic to run Borg once with
one_file_system (for the database backup) and once without (for the btrfs backup). The downside is you'd end up with a separate archive for each.
(Note that as of borgmatic 1.6.0, you can share common settings between the two configuration files pretty easily.)
Let me know your thoughts!
Thanks for your clear answer. That helps to understand.
I solved it for me to make the database dump "outside" borgmatic and put it in the filesystem, I use this also too switch to mariabackup instead mysqldump.
But will try the "two-config-solution" sometimes too.
Deleting a branch is permanent. It CANNOT be undone. Continue?