openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.51k stars 1.74k forks source link

zfs send -p is not allowed for encrypted datasets, without -w #16275

Open psy0rz opened 3 months ago

psy0rz commented 3 months ago

The zfs send manual states:

       -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.

This means its impossible to decrypt a dataset, while still sending over properties?

I would assume this is done deliberately, since sending over these properties would be problematic in that case: "keylocation", "pbkdf2iters", "keyformat", "encryption"?

But shouldn't -p be still allowed and just filter those properties automatically? Or is there another good reason to not allow this?

(Related usecase: https://github.com/psy0rz/zfs_autobackup/issues/257)

rincebrain commented 3 months ago

15310

I still think it's valuable to stop you from doing it without explicit confirmation, since people would be rather surprised by the outcome if they did it by default, but I agree that it should be possible to just ignore it.

psy0rz commented 3 months ago

well since this is the default behaviour for ever, i dont think we can change it, and we need an extra flag to "enable" something that should have been enabled by default.