how do you sync 2 freenas servers vise versa

comet424

Cadet
Joined
Jul 20, 2017
Messages
7
hi
I trying to sync 2 freenas's both being main server and a backup server
I tried the replication data set didn't like it as it erases files and takes forever

I tried rysnc but it buggers up when you resync it creates a new folder..
so what I want is 2 Main servers that back up to each other.. 1 will be at my house 2nd be at my sisters house.. now if I add a file to my server I want it to sync to my sisters freenas.. now if she adds files to her server then I want it to sync that data to my folder
problem is I I set the mount say on my server /mnt/mediaserver/ and my sisters freenas also /mnt/mediaserver now when I replicate to her server it works but if I add a file on her server same folder say /mnt/mediaserver/testing it will recreate on both servers /mnt/mediaserver/testing/mediaserver and replicate all the data back into into testing/mediaserver

its not syncing exactly same location how you fix this.. as I wanna use it for my movies so if she adds movie it replicate in right spot

2nd issue I have is plex server doesn't auto check for folder changes but ill worry about that later but I just having issues

so what I have on each server is a push task to send the files and a pull to receicve the files...

or is there another program that can update back and forth... and I found out I also cant delete some folders it replicated I now need unix/root access and I should yet I blocked out of it had to pull the hard drive shove in windows machine and delete the partition as even trying to detach and wipe the drive gave errors and so did trying to delete the datasheet main one..

so I kinda annoyed with this software but its free so I cant complain too much I just having difficultys rysncing back and forth
 

comet424

Cadet
Joined
Jul 20, 2017
Messages
7
an update i just checked my folders its replicating on itself..
so now like /mnt/mediaserver/testing/mediaserver/mediaserver/mediaserver
its syncing in on itself back and forth between the 2 freenas servers like frig all i wanted was 2 servers to be the main when you add files on either end it would put it in the right directory on the other computer but now its just replicating on itself ugh
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
The replication feature replicates - it doesn't sync - it is one direction and the remote side should be read only.

You are getting the nesting folders because you are replicating to the same dataset on both sides (which you shouldn't be doing) and probably have the path setup incorrectly so it is creating a nested dataset each time.

I believe rsync can be setup to sort of sync in both directions, but may have problems when you want to delete files. There is a utility called unison that is designed to do this, but it is not available in FreeNAS.

I would recommend setting up a separate dataset for yourself and your sister rather than trying to use the same one.
 

comet424

Cadet
Joined
Jul 20, 2017
Messages
7
guess my dyslexia messed up things
so I tried the replication and that I know I see deletes files its like a wipe the drive and just copy

as for the sisters and my freenas
my free nas is /mnt/mediaserver as the dataset is mediaserver and the sisters is /mnt/mediaserver as well
and then what I found is it rsynced fine first from my computer to her computer... but when I added a file on her side that's when it started rysncning
so now I have /mnt/mediaserver/mediaserver/mediaserver/mediaserver/mediaserver
with copies of the files in it
and all I did was I set my comp that rysnced to her computer and then I did a same copy but reversed the push to pull and then I got this replicating issue

so the rsync has caused this mirrioring effect replication its still going... and I take it unison is for windows


ya so I wanted exact copies on both computers... and say my sister added a movie in the movies folder it rysnc to my movies folder and copy it.... or if I put several cooking recipies in my document folders on my server it would then rsync to her server exact same folder..
so I wanted exact copy on each server and both being a main server not a secondary backup

like a redundant server
cant always get what you want lol
 

charlie89

Explorer
Joined
Dec 26, 2013
Messages
55
Have you tried syncthing? I actually haven't tried it, but it may do what you want.
It is available as a plugin in freenas, or you could manually install it in a jail (or docker, if you use it).
 

comet424

Cadet
Joined
Jul 20, 2017
Messages
7
I have installed it but I never really tried setting it up as google searchs all say use rsync its a much better program ill give it a shot again.. and I don't know what a docker is but I heard of it.. but ill give syncthing a shot
 

William Bravin

Contributor
Joined
Mar 16, 2016
Messages
194
I have installed it but I never really tried setting it up as google searchs all say use rsync its a much better program ill give it a shot again.. and I don't know what a docker is but I heard of it.. but ill give syncthing a shot
Hello , I will receive my second rig on which i will install freenas. I too would like to have 2 main server as you do in order to be a backup to each other (i will have a 3rd server as a backup server(.)

did you resolve your situation and if so what and how are u using it

Thank you for your response
 

GuRT.Yuri

Cadet
Joined
Apr 6, 2022
Messages
8
Has anyone figured out how to do this? As I have 2 servers in 2 states about 200 miles away. 1 is set(somewhat) to serve as a security and wifi server with access to files. The other 1 is at home and serves as a storage server for my company data(worker info, workers comp, payroll, etc) I want to know if I can sync both together so that I can access server A's files from Server B where if I change something in Server B, Server A will see that change and vice versa. If poasible, to have both backup to a 3rd server. Anyone know how to do that?
 
Top