Safest way to migrate files from old dataset to newer?

Hi,

I’m in the process of remodeling my TrueNAS Scale Datasets. I started as separating my data into SMB or NFS shares instead of creating different datasets (genius, I know).

I have a new pool where I would like to copy my data to. Here’s the structure so far:

old-pool:

old-dataset

old-SMB-share1

old-SMB-share2

My new structure currently looks like:

new-pool

new-dataset1

new-dataset2

My goal is to split the old-dataset, and copy old-SMB-share1 files to new-dataset1. In my understanding, Data Replication can’t do that trick since it can only move the whole dataset. So I would need to copy the files “manually” via something like rsync:

rsync -avhxs \
  --no-perms --no-owner --no-group \
  --no-acls --no-xattrs \
  --progress \
  /mnt/old-pool/old-SMB-share1 \
  /mntnew-pool/new-dataset1/

Is my rsync my best option? Should I use something else if I want to avoid SMB-permission issues?

Thanks!

Are these not datasets? If so, how did you create separate shares for the same dataset?


Also, a naive solution can be replication to 2 new datasets and then deleting the unnecessary directory for each dataset.

Are these not datasets? If so, how did you create separate shares for the same dataset?

These are not datasets. They are directories shared via SMB. I don’t see an issue creating multiple SMB shares accross the same dataset.

Also, a naive solution can be replication to 2 new datasets and then deleting the unnecessary directory for each dataset.

I got that idea as well, but I’m really trying to avoid operations that include deletion of terabytes of data.

do you have a backup server for your NAS server? when i migrated my Core datasets (to a totally different NAS system), I simply created the new NAS system and backup the backup server to the new NAS system. cannot be safer than that.

personally, I would not migrate unless I have a backup copy of the data.

Yeah. I just wonder how you did it in truenas. Just checked it myself. Truenas ui creates smb share from path (not from dataset).

Well, it’s only true if each of both directories contains terabytes of data. I’m a big fan of naive solutions for one-time tasks, because machine time costs (almost) nothing, and trying to figure out the perfect solution can take a long time.