TrueNAS Bidirectional Replication

I would like to know if it is possible to use the TrueNAS replication feature from box A to B and from B to A at the same time. It would be great if both boxes were a single sync system, but I would also have no problem with A to B and B to A being split into different shares. What is the best approach to this? I would like to have both boxes act as a cache for files to get the best local performance, while cross-continent sync can be slow.

If there are better solutions to have two boxes auto merged together please tell me.

Don’t be too crazy here, but could I also do that with more boxes?

If there is a better system than TrueNAS I could switch too.

ZFS replication as it’s name implies, is block level replication from one ZFS system to any number of others destination systems and that’s it. If you are looking for a syncing tool we use Syncthing for that as that is what’s Syncthing is designed for, bi-directional sync and it has system to handle changes and conflicts.

1 Like

Thanks for you answer. Can I integrate Syncthing directly into TrueNAS or is that more of a manual process? Is it correct that Box A can replicate to Box B while Box B is also replicating to Box A?

Syncthing works with both TrueNAS core or TrueNAS Scale. Not clear on the second question.

Thanks, I will have a look at Syncthing. How is it integrated? Do I have to run it manually?

My second question is about replication. If I have two TrueNAS systems, can I replicate both to the other or can I only replicate one to the other?

I forgot to mention that my TrueNAS systems would be on different continents, so I don’t know if replication or Syncthing would be reliable. Can you please give me some information on this as well?

You can setup multiple jobs in replication to and from each machine. Syncthing can be loaded in a Jail in TrueNAS core and as a Docker container in TrueNAS Scale.

I have a video here on replication:

1 Like

I replicate TrueNAS volumes between my house and a family members house. We each have a TrueNAS system that replicates the pools to the other persons house. It works very well, it runs over a wireguard tunnel. I have a script that periodically checks the wireguard connections and brings it online if it’s down (ie. after a power loss etc.). I haven’t tried trying to replicate the same pool bidirectionally, it doesn’t seem like replication is really designed for that as I don’t believe there’s any options to replicate upon files changing.

I’ve used SyncThing in the past and it worked well enough for me. I don’t do real-time file syncing now though as I have symmetric gigabit at my house so I simply access all my files directly over the internet via WireGuard.

Are you talking about snapshots of datasets?

Follow Tom’s advice it works, don’t over complicate.