psy0rz / zfs_autobackup

ZFS autobackup is used to periodicly backup ZFS filesystems to other locations. Easy to use and very reliable.
https://github.com/psy0rz/zfs_autobackup
GNU General Public License v3.0
583 stars 62 forks source link

multiple backups of the same dataset #196

Closed pterrien closed 1 year ago

pterrien commented 1 year ago

Hi,

First, sorry if this question has been answered already, I searched the docs and issues but could not find the answer. And I haven't had the opportunity to test it myself yet, as I'm reorganizing my pools for the moment... but I will surely give zfs-autobackup a try, as I find it very well designed, the documentation is great and the code seems pretty clean!

Let's say I have a dataset on my server, on which I would like to define 2 separate tasks, one being scheduled daily to backup to my workstation, the second being an on-demand backup to a removable drive (on the same server). From my understanding, I will define 2 user properties, eg autobackup:scheduled and autobackup:removable, will schedule a backup task for the former, and a snapshot one for the latter. And when my removable drive is plugged in, I will then launch a backup for removable. Correct?

My question is: how will zfs-autobackup manage the common snapshot for both the tasks, especially if I use the thinner? Will it be able to differentiate the snapshots for each backup task, setting the right holds so that my removable target never gets out-of-sync? What would be the proper way to do?

Thanks.

Edit: changed the use case a bit, to have scheduled backup to my workstation instead of locally. Otherwise I believe I could cascade, and set the autobackup:removable property on the scheduled target, am I right?

psy0rz commented 1 year ago

yes thats the way to do it: the thinner will only remove snapshots that belong to that specific backup. So multiple jobs wont bother eachother.

psy0rz commented 1 year ago

the documenation indeed wasn't clear about this, so i added it:

https://github.com/psy0rz/zfs_autobackup/wiki#multiple-backups-of-the-same-data