Copying data from unencrypted dataset to an encrypted dataset on new Truenas Scale server

stinkyCheeze

Cadet
Joined
Feb 26, 2024
Messages
3
I have an old Truenas Scale server that I am going to be decommisioning soon. I want to transfer all my data from my old server to a new server then take the drives from the old server and add them to my existing pool on the new server. Here is what my ZFS setup looks like right now:

Old Server:- datapool1 (unencrypted pool)

- dockers (unencrypted dataset)

- shared (unencrypted dataset)



New Server:

- mirpool (encrypted pool)

- dockers (encrypted dataset)

- shared (encrypted dataset)

I have tried copying the data to the new server with a replication task but that errors out with the following:
l02ox12p86pc1.png


And this is what my replication task looks like:

r/truenas - Copying data from unencrypted dataset to an encrypted dataset on new Truenas Scale server
Am I doing something wrong? Is this the best way to copy the data to my new server?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
- mirpool (encrypted pool)
Is mirpool already encrypted?

Uncheck inherit encryption, or try with an encrypted dataset as the target /mirpool/newdataset/

Or uncheck inherit and set a new encryption in the replication task. But keep in mind that the datasets cannot be unlocked via the parent in that case.

Personally I prefer one snapshot task and Replication task per dataset.
 

Bonnie Follweiler

QA Technician
iXsystems
Joined
May 23, 2016
Messages
35
Good afternoon @stinkyCheeze.
What version of TrueNAS is your older server and your newer server on?
You might try unsetting the Include Dataset Properties option in that task and try it again to see if that works.
 

stinkyCheeze

Cadet
Joined
Feb 26, 2024
Messages
3
Thank you gentlemen.

I took @chuck32's advise and unchecked inherit encryption and set a new encryption on the task. Only problem there is going to be that the parent pool (mirpool) and the child datasets will have different encryption settings. I don't think that's a big deal because I can always go back and change parent's encryption settings (please correct me if I'm wrong with this assumption). I posted a screenshot of my settings below in case this helps anyone else in the future.

However, this did bring up the following questions:

1 - If the parent pool is encrypted and I create an unencrypted dataset under the encrypted pool, will the dataset be unencrypted?
2 - If I were to snapshot and restore the whole pool, would I need the key of the pool to restore the child unencrypted dataset?
3 - Is it better to have an unencrypted pool and just encrypt my datasets under that pool? Or would it be better to have an encrypted pool with a select unencrypted datasets?

@Bonnie Follweiler: to answer your questions, my old server is on TrueNAS-23.10.1 and the new server is on TrueNAS-23.10.2. However, I had selected Full Filesystem Replication when trying again. It appears to be working so I didn't stop it. Is that going to pose an issue?

Here is the screenshot of the settings that I used:

Screenshot 2024-03-19 at 4.10.29 PM.png
 
Top