TL;DR
First recv with -o encryption=on (no -w). Destination dataset name is required.
Same bytes, new key. Source stays plaintext; destination is born encrypted. OpenZFS allows this only on the initial receive (dataset that does not exist yet).
Source thread: r/zfs.
Command
| |
Things that silently break the send:
- Do not use
-w. Raw send replicates the source encryption state. Plaintext in → plaintext out, and-o encryption=…is ignored or errors. - Name the destination dataset (
tank/encrypted). Arecvwith no target does not create it. - Passphrase vs file:
keylocation=promptis a bad fit across a non-interactive pipe. Use a keyfile. - Later incrementals (
-i) inherit encryption. Do not pass-o encryption=onagain.
Check
| |
The other direction
Encrypted → encrypted with the same wrapping key: zfs send -w. Encrypted → new wrapping key: send without -w (ZFS decrypts on send; recv encrypts). That needs load-key on the source and is slower.
See also: native encryption.