Skip to content

Encryption

DatuX edited this page Nov 13, 2026 · 10 revisions

How does zfs-autobackup handle encryption?

By default, zfs-autobackup transfers datasets without changes:

  • An encrypted source dataset stays encrypted on the target. ZFS calls this "raw mode". The target does not need the keys, unless you want to read the data. This is useful for backups to servers that you do not trust.
  • A plain source dataset stays plain on the target, also if the target path is encrypted.

Usually you do not have to do anything.

Decrypting/encrypting

To change the encryption during the transfer:

Option Result on the target
--decrypt Encrypted datasets are decrypted before the send. They are plain on the target.
--encrypt Plain datasets are encrypted when they are received. Encrypted datasets are still sent in raw mode.
--decrypt --encrypt All datasets are encrypted with the encryption of the target.

Notes

  • --encrypt uses the encryption settings that the target datasets inherit from their parent. You must set up the parent and load the keys. If you do not do this, zfs-autobackup stores the data not encrypted.
  • zfs-autobackup ignores --encrypt for datasets that are already encrypted. It sends them in raw mode, unless you also use --decrypt.
  • Select your options before the first sync. If you change --encrypt or --decrypt later, you can get errors. These errors are not dangerous.

Some common errors while using zfs encryption

cannot receive incremental stream: kernel modules must be upgraded to receive this stream.

This error occurs when the target datasets are encrypted and you did not use --encrypt.

Clone this wiki locally