I’ve written a set of scripts that solve a problem I’ve had. I run duplicati in a docker container and use it to backup ZFS datasets. For a while I just backed up the datasets directly and ignored the fact that files would likely change during the backup and couldn’t be restored correctly. Since duplicati is running in a container, I couldn’t use duplicati’s pre- and post- commands ability since from within the container I couldn’t run zfs commands on the host host. My solution was to write these scripts that run on the host to create the snapshot and mount it and then to use a duplicati client to trigger the backup job on the duplicati server. It’s working really well for me…
So if you:
- Have duplicati running in a docker container
- Want to backup filesystems that are mounted on ZFS datasets
- Would like to take advantage of ZFS Snapshots so that each backup is clean (that is, all of the files are unchanging during the backup)
then these scripts may be useful for you.
You can find them at GitHub - pheitman/backup-zfs-snapshots-with-duplicati: Scripts and instructions to backup zfs snapshots with Duplicati