Join two datasets into one dataset

I am fairly new to the whole TrueNAS/Linux enviorment. Originally coming from Microsoft world, so please be patient. I am still learning.

TrueNAS SCALE 25.04

The dataset /mnt/data/media and /mnt/data2/media contain different folders. They have to be joined into one dataset /mnt/data1/media. I want to do that only with supported methods. How can I do this. I digged into to documentation and Rsync is only for remote data movement. If I use replication I get two new datasets; data_media and data2_media. How do I join them into /mnt/data1/media/ ?

Or is it supported, if ssh into my TrueNAS server and exec the following lines:

rsync -avh --progress /mnt/data/media/ /mnt/data1/media/
rsync -avh --progress /mnt/data2/media/ /mnt/data1/media/

Yes, RSync can be used for local file copies. I generally would include these options:

rsync -aAHhSXxv --stats --progress /mnt/data/media/ /mnt/data1/media/
rsync -aAHhSXxv --stats --progress /mnt/data2/media/ /mnt/data1/media/

However, in some cases local data copies cause problems with file and directory / folder permissions & atributes. This can cause endless trouble for SMB shares. Not saying this will occur, but there is a reason iX prefers users to make file copies over the network.

1 Like

Thank you! I will try that and see what happens.

Am I missing something here?

What is wrong with good old fashioned cp?

You get no progress or statistics at the end. I happen to have the RSync options memorized, because I use it for incremental backups, (on top of ZFS snapshots).

Plus, cp does not properly deal with hard links unless you add that option. Or sparse files, again unless you add that option.