Trying to mirror drives over network, not sure if I am having issues or just don't understand the concept

Linux Machine and TrueNAS
I have SMB share configured on TrueNAS and I can read/write
I tried to get NFS share to work and I can’t get passed “read only”

I want to have a mirrored directory on both machines.
Both TrueNAS and Linux Machine generate data in the directory
Once a day or night I want to sync/mirror those drives.
Linux machine data transfers to TrueNAS and vice/versa

Where/what should I look into to read up and see how to do this?
Not even sure what to search for at this point.

I don’t fully get what you are trying to do. If you have the SMB share already, you can just connect it and write to it from your Linux machine.

You can do the same with a NFS share. Just works a bit differently.

You can also sync folders using various methods, from rsync or backup tools using it to syncthing or similar tools.

Can you describe a bit more what exactly you want to achieve? It makes it easier to suggest something that way.

The reason is, trying to edit videos over the network is rather slow.

So I would edit the movies on the Linux machine with local files.
then once a day mirror them over

Thanks, that makes it clearer. So in that case, I assume, you would be fine with just backing up your local files to the NAS. Is this correct?

If so, you can just use a backup tool like duplicity or whatever most likely comes with your Linux DE/Distro with the SMB share as your target. This creates a backup for you that can be restored. This might be compressed or versioned so not a true “mirror” of your files.

If you want to sync the folder, you can use rsync if you know how to or are willing to read the docs or something like syncthing… where you would have to read some docs.

I would really prefer the back-up to be a mirror of both drives.

I have tried freefilesync, but I get weird errors trying to write files.
I am surprised there is not a native sync type application with GUI.

I will look into rsync

There are some GUIs for rsync iirc. I have no experience with any of them, so try them at your own risk, if you want.

One more thing…

I have the NAS dataset MEDIA which lives on my RAIDZ1 DEV

I want a pure back-up on a weekly basis to my other ARCHIVE DEV RAIDZ2 on the same NAS machine.

What should I look at for that? That would be done all on the TrueNAS machine

Snapshots and Replication tasks

Personally I would use syncthing to continuously mirror the 2 folders in question. Any changes would be written “immediately” across the network to the remote machine

Came here to say this. Nextcloud is another option, but for n-way near-real-time file syncing, Syncthing is hard to beat.

I agree, that’s why it was one of the options I mentioned. But since it is a separate APP which has to be configured again, I didn’t want to push it too hard.

I was playing with it today, and no matter what I get some weird errors and permissions issues.

I still don’t think I understand/know how to do these permissions.

There is a single user/login on each machine.

What should the TrueNAS permissions be? Same as the user.

Group for Media? Same as user or MEDIA?

You should find all information here:

If you then still have issues, try to give us as much information as possible (without giving us your passwords) so we can try to help you.

I am still struggling with this… I made the following changes.

My Ubuntu machine I changed the username/password to match the TrueNAS, so its all the same user now.

I read through various things showing how to setup ACL on TrueNAS.
It is “apps” and “apps”
And the share is “everyone”

I still have some folders that have errors when syncing.
I tried Rsync and now went back to trying FreeFileSync.
The errors are only on specific folders/files. Maybe 5% of the storage has errors.

08:18:29 AM Error Unable to move “/mnt/Media-DS/Home_Movies-DS” to the recycle bin.
G_IO_ERROR_PERMISSION_DENIED: Unable to trash file /mnt/Media-DS/Home_Movies-DS: Permission denied [g_file_trash]
08:18:32 AM Error Cannot rename “/mnt/Media-DS/DSCF6607-9f0f.ffs_tmp” to “DSCF6607.jpg”.
The name “DSCF6607.jpg” is already used by another item.

I got some new physical disks I added to TrueNAS
I created a new RAIDZ2 VDEV.
I created a Media directory with Samba share.

I transferred the same files from my Ubuntu machine.
And it looks like the same sync issues with the other TrueNAS Udev.

I am guessing something going on with the Ubuntu machine? I did reset the files permissions to my username/group which matches TrueNAS. So really lost on all this.