Offsite TrueNAS backup with raw encrypted ZFS replication to a remote Linux host: commands, UI options, restore test

Your replica sits in the same rack as the pool. One PSU surge, one burst pipe or one stolen chassis, and both are gone. That is not a backup, it is a second copy in the same failure domain.

Here is a setup that fixes it: raw (encrypted) ZFS replication from TrueNAS to a remote Linux box that never receives your keys.

What you need

  • Source: an encrypted dataset, here tank/data.
  • Remote: any Linux host with OpenZFS, a pool (here backup), and an SSH user that may run zfs receive.
  • An SSH key pair. Use a dedicated key for replication.

First confirm the source is actually encrypted:

zfs get encryption,keystatus tank/data

If encryption is off, a raw send sends plain data. Fix that before anything else.

Do the math on the first seed

The first send moves everything. 5 TB over a 100 Mbit/s uplink is 5×10¹² × 8 / 10⁸ ≈ 400,000 s, about 4.6 days at perfect line rate. Real throughput is lower. That is why -s (resumable receive) matters.

Manual run first (so you understand what the UI does)

zfs snapshot -r tank/data@offsite-2026-11-03

zfs send -R -w tank/data@offsite-2026-11-03 \
  | ssh backup@remote zfs receive -s -u backup/truenas/data
  • -R sends the dataset, its children, snapshots and properties.
  • -w makes it a raw send. Blocks stay encrypted and the remote gets no key.
  • -s keeps partial state if the link drops.
  • -u does not mount on the remote.

If the transfer is interrupted, resume it with the token stored on the receiving side:

ssh backup@remote zfs get -H -o value receive_resume_token backup/truenas/data
zfs send -t <token> | ssh backup@remote zfs receive -s -u backup/truenas/data

Incremental sends

zfs snapshot -r tank/data@offsite-2026-11-10

zfs send -R -w -I tank/data@offsite-2026-11-03 tank/data@offsite-2026-11-10 \
  | ssh backup@remote zfs receive -s -u backup/truenas/data

Two things to know:

  1. Give -I the full snapshot name (tank/data@offsite-2026-11-03), and that snapshot must already exist on the remote for every dataset in the tree.
  2. Without -F, the receive fails with a “destination has been modified” error if anything changed on the remote since the last snapshot. Mounting it, or even just reading it with atime on, can cause this. Keep it unmounted. To recover, run zfs rollback -r backup/truenas/data@offsite-2026-11-03 on the remote. -F does the rollback for you, but with -R it can also destroy remote snapshots and datasets that are not on the source. Use it deliberately.

Automating it in the TrueNAS UI

Go to Data Protection → Replication Tasks → Add. Option names shift a little between versions, so check yours. What matters:

  • Transport: SSH, with your dedicated key.
  • Source: tank/data, with Recursive checked.
  • Include Dataset Properties: checked. A raw replication of an encrypted dataset needs the encryption properties to travel with it.
  • Encryption (the destination option): leave it off. That option sets up new encryption on the destination, which means a non-raw send, so the data is decrypted on the source and re-encrypted on the other end.
  • Schedule and snapshot naming schema: pick a schema such as offsite-%Y-%m-%d and a retention you can live with.

Then verify after the first run, on the remote:

zfs get -r encryption,keystatus backup/truenas/data

You want encryption set to a real cipher (for example aes-256-gcm) and keystatus of unavailable. If you see off or available, stop the task and fix it. Plain data went out.

Test a restore, without handing over your key

Do not run zfs load-key on the remote. That puts your key on a machine you do not control, and defeats the point of raw sends. Pull the data back to a machine you do trust instead:

ssh backup@remote zfs send -w backup/truenas/data@offsite-2026-11-10 \
  | zfs receive -u testpool/restore

zfs load-key testpool/restore
zfs mount -a

Check a few files and compare checksums against the source. Only load the key on the remote if the data is throwaway test data.

Also run zpool scrub backup on the remote on a schedule and watch zpool status there, since TrueNAS alerts will not cover that host.

Disclosure: I write for vpsttt, which sells VPS and proxy services. Nothing above depends on it. Any Linux host with OpenZFS and enough disk will do.

Good writeup. One thing I’d add for the ransomware case. With push replication the backup user on the remote usually ends up with destroy rights, because the source prunes old snapshots over that SSH connection, and receive -F needs it too. So whoever steals the replication key from the TrueNAS side can also wipe the remote history, which is the copy you were counting on.

On a plain Linux remote you can give that user less. Something like zfs allow backup create,mount,receive:append backup/truenas gets you a receive that can’t do -F and no destroy. You’ll probably need to allow the properties that come along with -R too, so try it on a scratch dataset first. Then set the destination retention in the TrueNAS task to none and prune on the remote with its own cron as root. You lose pruning from one place, but the source can only add snapshots there, never remove them.

Disclosure: I’m founder and CEO of CyberSnap.