Pcornel
Storage · Data Protection

ZFS Encryption

Cheat sheet · https://pcornel.dk/topic.php?topic=4289

Back to the Topic

Answer

ZFS native encryption encrypts datasets with AES-GCM, keeping keys per dataset. Encrypted datasets can be replicated with raw zfs send to a backup host that never needs the key.

Remember

  • Encryption is per dataset.
  • Raw zfs send replicates without the key.
  • Key must be loaded after boot.

First checks

  • zfs get encryption,keyformat,keylocation,keystatus <ds> — encryption props
  • zfs load-key <ds> — unlock
  • zfs send -w <ds>@snap — raw encrypted send

Commands

zfs load-key -a
zfs send

Verify in this order

dataset → wrapping key → data keys → encrypted blocks

Where it usually breaks

First mismatch in source consistency → capture/journal → transport → repository/replica → catalog/checkpoint → restore/failover read-back; preserve identity/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4289

Confirmation

Confirm action

Continue?