Replication Task does not encrypt datasets recursively

avanc

Cadet
Joined
Oct 25, 2022
Messages
2
Hello,

as part of my backup strategy, I want to replicate a dataset including all childs to pool located on an USB drive. As this drive is going to be stored at another location, the datasets shall be encrypted, although the source is not encrypted. Thus, I created the following replication task:
1666717799127.png

I selected "Encryption" using a passphrase for the destination and "Recursive" to include its child dataset.

However, after replication is finished, the child dataset "subset" in the destination pool is not encrypted:
1666718000819.png


And I cannot activate encryption afterwards. Is there anything I'm doing wrong or is this a bug? I'm running TrueNAS-13.0-U2.

Thanks for any suggestions
Sven
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
is this a bug?
Nope.

You can't use block-level replication to magically make datasets encrypted as they replicate. If the source block is unencrypted, then that's what replicates.

If you want the contents to move to a differently encrypted location than the source, you need to move them in there with something like rsync.
 

avanc

Cadet
Joined
Oct 25, 2022
Messages
2
Thanks for the explanation.
But for the parent dataset (test_backup), which is not encrypted at source, it works as expected. Otherwise, I would wonder why the UI provides the selection of encryption options.
 

StorageCurious

Explorer
Joined
Sep 28, 2022
Messages
60
I am running tests right now, and I suspect "children dataset properties" is the culprit.

Maybe you'll have to Replicate all children separately, but that leaves room for forgetting a new subset in the future.
 
Joined
Oct 22, 2019
Messages
3,641
I believe you'll need to create a Replication Task with the "Advanced" settings, and enable "(Almost) Full Filesystem Replication" (or at the least "Include Dataset Properties".)

My apologies, read the initial OP incorrectly.
 
Last edited:

StorageCurious

Explorer
Joined
Sep 28, 2022
Messages
60
I believe you'll need to create a Replication Task with the "Advanced" settings, and enable "(Almost) Full Filesystem Replication" (or at the least "Include Dataset Properties".)
Well, not to hijack the OP's thread, but my own source dataset is NOT encrypted - I do want my replication, in a less physically secure place, to be encrypted - children datasets included. In my case, only my parent dataset is encrypted on the replication machine if I choose to "encrypt" the replication.
 
Joined
Oct 22, 2019
Messages
3,641
In my case, only my parent dataset is encrypted on the replication machine if I choose to "encrypt" the replication.
What options are you using the in configured Replication Task? (You might have to view "Advanced".)
 

StorageCurious

Explorer
Joined
Sep 28, 2022
Messages
60
What options are you using the in configured Replication Task? (You might have to view "Advanced".)

In the end my theory of "use child properties" seems to have turned out correct. When I unchecked that, child datasets were encrypted.
 
Top