oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
607 stars 137 forks source link

Support --autoCreation for sendRaw feature #496

Closed hansoostendorp closed 4 years ago

hansoostendorp commented 4 years ago

This change addresses these issues:

The issue is the way how znapzend handles destinations that do not exist. This isn't compatible with how ZFS handles a raw encrypted stream. This behaviour is introduced in PL #468 when the sendRaw feature is introduced. ZnapZend always uses the -F receive option that cannot be used to destroy an encrypted filesystem or overwrite an unencrypted one with an encrypted one. And ZnapZend creates an unencrypted destination dataset when --autoCreation is used. This triggers a ZFS error when sending a snapshot using a raw encrypted stream when the destination doesn't exist.

Changes in this PL:

This way the behaviour of --autoCreation is the same for normal streams and raw encrypted streams, and all information displayed to the user about destinations that do not exist and how to address this are still valid.

hansoostendorp commented 4 years ago

Thanks!