I have two TrueNAS systems and I need to replicate/backup one dataset from TrueNAS A to an encrypted on rest dataset on TrueNAS B.
I created a replication task on the sending system using a phassphrase for the data encryption (not talking about the tunnelling encryption). On the remote system a new encrypted dataset has been created but with it the encryption key has been loaded on the remote system.
I don’t want to keep the data accessible to the remote system so I tried to unload the encryption key on the remote NAS but after that the sending TrueNAS wasn’t able to start the replication task anymore ([EFAULT] Active side: cannot receive incremental stream: inherited key must be loaded.).
So am here asking how to achieve my setup: I want to backup a dataset to a remote system but I want those data to be unreadable by the remote system.
Should I rely on rsync? Is it possible to do with a Replication Task somehow?
I suspect it’s possible to do this using ZFS replication, but I’m not familiar enough with its details regarding encryption to say for sure. Syncthing can handle it easily enough though. https://docs.syncthing.net/users/untrusted.html
What I got is an encrypted dataset on the remote system but the encryption key is available to the remote system so all the files are readable on the remote TrueNAS.
(ideally) I would like the en/decryption key to be available only to the sending system which will get access to the dataset, store the updated data and lock it back again.
@dan I am aware it is possible at file-level (with syncthing or duplicity), I would like to rely on the TrueNAS/zfs capabilities first.
If there was a feature to “issue command after send completes” or “lock target after send completes”, then it could work, but no such thing exists in the GUI.
You would essentially need to issue the command zfs unload-key over an SSH connection to do this.
It does leave you open to someone accessing the data on the remote system while the dataset(s)/pool is unlocked. Probably low risk since you’ve presumably got strong passwords on accounts and not running services like SMB, but still not as secure as having no way at all of decrypting the data on the destination.
If the source were encrypted, there are zfs switches you could use on the command line to replicate the raw encrypted data;
Thanks all for the clarifications. I think I will go with minIO this time since using the replication & API requires too many customizations to the system I wouldn’t want to rely on.
I was hoping it was something available/supported out of the box.