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

Issue with duplicate zfs sends #194

Closed florian-obradovic closed 1 year ago

florian-obradovic commented 1 year ago

Hi and thank you very much the great work.

Unfortunately I'm struggling getting it to work with my use case:

I want to backup my rpool to thunderbolt ssd (thunder-970evo) and also to a second pool. If I understand it correctly I need to create to groups backup2thunder-970evo & backup2tank.

My problem now is that zfs-autobackup wants to copy received datasets on thunder-970evo (with autobackup:backup2thunder-970evo) to my tank as well because the property backup2tank has been sent to thunder-970evo:

CleanShot 2023-05-22 at 13 05 08@2x

What could be a solution? Can we only transfer datasets where property is local / not received?

Thanks a lot and best regards!

psy0rz commented 1 year ago

Yes, you can use --exclude-received for that.

Which version of zfs-autobackup do you have? It should normally use that option automaticly if the backup is local. (e.g. if you do not specify ssh-source and ssh-target.)

florian-obradovic commented 1 year ago

Awesome, I'm afraid it doesn't work for me by default. zfs-autobackup --version zfs-autobackup v3.1.3 - (c)2021 E.H.Eefting (edwin@datux.nl)

I will try the --exclude-received option!

florian-obradovic commented 1 year ago

That works for me (but wasn't used automatically!)! Thanks a lot!

florian-obradovic commented 1 year ago

Is there also an option to only send received and don't create new snapshots so I can safe one group?

I'd like to pickup all snapshots from tank/encrptd/zfs-autobackup with property autobackup:backup2tank and send them to external usb-disk

My current workaround is --keep-source=0

Is my approach wrong or too complicated? Basically I want a secondary target or source > stage 1 > stage 2 backup strategy without having too many / "duplicate" snapshots laying around.

CleanShot 2023-05-22 at 17 34 01@2x

Any hints? thanks.