How do I setup real-time sync beetween 3 folders?

Get help for specific problems
Posts: 3
Joined: 8 Sep 2021

shepherdman

I want to set up two-way sync between 3 folders.
I've 3 directories,
E:\Code\
\\192.168.0.101\e$\Code\
\\192.168.0.102\e$\Code\
I want to set up sync in a way that any change made anywhere should reflect in all the three folders, so I set up the rule like,
E:\Code\ <-> \\192.168.0.101\e$\Code\
E:\Code\ <-> \\192.168.0.102\e$\Code\
However, when using real-time sync and make changes in \\192.168.0.101\e$\Code\ it reflects in E\Code but not \\192.168.0.102\e$\Code\ and fails with exit code 1 (I remember getting some error regarding multiple base folder in GUI, but it synced anyway if I ignored it, but I want to use real-time sync).

Any help would be appreciated, TIA.
User avatar
Posts: 2946
Joined: 22 Aug 2012

Plerry

First of all: you don't setup RealTimeSync to sync between folders. See here.

When running an FFS sync
E:\Code\ <-> \\192.168.0.101\e$\Code\
E:\Code\ <-> \\192.168.0.102\e$\Code\
You do get a warning (not error), and hence exit code 1, regarding overlapping multiple base folder pairs. This is correct, as there an overlap between pair 1 and pair 2, which here is E:\Code\ (and everything inside E:\Code\).

Your conclusion that with above sync configuration changes in \\192.168.0.101\e$\Code\ will sync to E:\Code\ but not (yet) to \\192.168.0.102\e$\Code\ is correct. This will only happen on the next sync.
This is, because in the FFS Compare phase the (pre-sync) content of the left and right locations are compared and (proposed) actions defined. And as pre-sync E:\Code\ does not yet comprise the change made in the 101 location, the 101 change will not (yet) be synced to the 102 location.

You can do two things:
1) have a single RTS instance monitor all three locations (the E:-, 101- and 102-locations), and upon detecting changes invoke a batch file that launches the above sync twice successively. As per your example the first run will sync the change from 101 to E: and the second sync then from E: to 102.
2) Define three RTS instances
2a) A first RTS instance monitoring E:\Code\ and upon detecting changes run an FFS sync defined as
E:\Code\ <-> \\192.168.0.101\e$\Code\
E:\Code\ <-> \\192.168.0.102\e$\Code\
2b) A second RTS instance monitoring \\192.168.0.101\e$\Code\ and upon detecting changes run an FFS sync defined as
\\192.168.0.101\e$\Code\ <-> E:\Code\
\\192.168.0.101\e$\Code\ <-> \\192.168.0.102\e$\Code\
2c) A third RTS instance monitoring \\192.168.0.102\e$\Code\ and upon detecting changes run an FFS sync defined as
\\192.168.0.102\e$\Code\ <-> E:\Code\
\\192.168.0.102\e$\Code\ <-> \\192.168.0.101\e$\Code\

Approach 2 runs different syncs depending on where the change originates, then syncing the source of the change to both other locations.

Note that any changes made during running a sync will only propagate when the next sync is run.
Posts: 3
Joined: 8 Sep 2021

shepherdman

First of all: you don't setup RealTimeSync to sync between folders. See here.

When running an FFS sync
E:\Code\ <-> \\192.168.0.101\e$\Code\
E:\Code\ <-> \\192.168.0.102\e$\Code\
You do get a warning (not error), and hence exit code 1, regarding overlapping multiple base folder pairs. This is correct, as there an overlap between pair 1 and pair 2, which here is E:\Code\ (and everything inside E:\Code\).

Your conclusion that with above sync configuration changes in \\192.168.0.101\e$\Code\ will sync to E:\Code\ but not (yet) to \\192.168.0.102\e$\Code\ is correct. This will only happen on the next sync.
This is, because in the FFS Compare phase the (pre-sync) content of the left and right locations are compared and (proposed) actions defined. And as pre-sync E:\Code\ does not yet comprise the change made in the 101 location, the 101 change will not (yet) be synced to the 102 location.

You can do two things:
1) have a single RTS instance monitor all three locations (the E:-, 101- and 102-locations), and upon detecting changes invoke a batch file that launches the above sync twice successively. As per your example the first run will sync the change from 101 to E: and the second sync then from E: to 102.
2) Define three RTS instances
2a) A first RTS instance monitoring E:\Code\ and upon detecting changes run an FFS sync defined as
E:\Code\ <-> \\192.168.0.101\e$\Code\
E:\Code\ <-> \\192.168.0.102\e$\Code\
2b) A second RTS instance monitoring \\192.168.0.101\e$\Code\ and upon detecting changes run an FFS sync defined as
\\192.168.0.101\e$\Code\ <-> E:\Code\
\\192.168.0.101\e$\Code\ <-> \\192.168.0.102\e$\Code\
2c) A third RTS instance monitoring \\192.168.0.102\e$\Code\ and upon detecting changes run an FFS sync defined as
\\192.168.0.102\e$\Code\ <-> E:\Code\
\\192.168.0.102\e$\Code\ <-> \\192.168.0.101\e$\Code\

Approach 2 runs different syncs depending on where the change originates, then syncing the source of the change to both other locations.

Note that any changes made during running a sync will only propagate when the next sync is run. Plerry, 08 Sep 2021, 12:51
Hi there,

I tried as as per your suggestion and I enclosed the command within,
for /l %i in (1,1,2) do ( <command here> )
and it works according to my need.

Thanks for the quick answer.