I'm using borgmatic to backup my whole server. As I'm runing LVM, I mount LVM snapshots to /media/..
and back them up.
source_directories:
- /media/snapshot-root/
- /media/snapshot-var/
- /data/home
That results in paths inside the backup beginning with /media/snapshot-root/
which is ugly, hard to understand and unnecessary. For example If I want to restore /etc
I have to take a look into /media/snapshot-root/etc
.
I know that there is an option
Working directory for the "borg create" command. Tildes are expanded. Useful for backing up using relative paths. See http://borgbackup.readthedocs.io/en/stable/usage/create.html for details. Defaults to not set. working_directory: /path/to/working/directory
But this does not help for multiple different paths. I also know that cd
ing into the desired root path would work, but I cannot cd
into three different paths.
The only soluition i found was setting each directory to a single file in /etc(borgmatic.d/
but as I already use this for two different locations I would rather avoid it.