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

document and emit warning about not sending properties when using --decrypt #257

Open psy0rz opened 2 months ago

psy0rz commented 2 months ago

When using --decrypt, we actually disable sending over properties:

https://github.com/psy0rz/zfs_autobackup/blob/c52857f7b9a87d14f042a46cb98b643c09592adc/zfs_autobackup/ZfsDataset.py#L1131

This is related to this manual entry of zfs send:

       -p, --props
           Include the dataset's properties in the stream.  This flag is implicit when -R is specified.  The receiving system must also support this feature.  Sends of encrypted datasets must use -w when using this flag.

We should document this clearly, and perhaps emit a warning?

Basically it seems impossible to send properties when you want to send over the data decrypted. This is a feature of zfs send but i think its more of a bug?

Shouldn't zfs send just allow this for encrypted data sets and automatically filter "keylocation", "pbkdf2iters", "keyformat", "encryption"?