Snapshot send encrypted to a backup destination for the first time fails #495
Raw (encrypted) send failure #491
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:
Do not use the -F receive option when sendRaw feature is used
Do not create an unencrypted destination dataset when the sendRaw feature and--autoCreation is used, but let ZFS automatically take care of this.
Do not send snapshots to the destination when the sendRaw feature is used and --autoCreation is omitted and the destination dataset doesn't exist.
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.
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.