Sync NAS from two PC‘s

Discuss new features and functions
Posts: 1
Joined: 21 Dec 2022

Bobel

Hi,
I have two PC‘s connected to a Synology NAS. Is it possible to sync one PC as master and the other one as a slave?
Meaning: PC1 syncs TO the NAS. PC2 syncs FROM the NAS.
Or will the program get confused because two sync.ffs_lock files are created?
User avatar
Posts: 2288
Joined: 22 Aug 2012

Plerry

FFS will not get confused, it will just wait until the FFS sync job that wrote the sync.ffs_lock file on the NAS finishes and removes the sync.ffs_lock file (see the link below).

But if your data-flow is only as described:
PC1 => NAS
and
NAS => PC2
There is even no need to use the sync.ffs_lock files at all.
You can turn that off by setting the LockDirectoriesDuringSync flag to "false".
User avatar
Posts: 3611
Joined: 11 Jun 2019

xCSxXenon

But if your data-flow is only as described:
PC1 => NAS
and
NAS => PC2
There is even no need to use the sync.ffs_lock files at all.
You can turn that off by setting the LockDirectoriesDuringSync flag to "false". Plerry, 21 Dec 2022, 13:07
Not quite true. The point of the lock is so multiple syncs from/to the same directory don't occur. If they disable the locks, there is a chance that NAS->PC2 is in the middle of a sync while PC1->NAS is copying new data to the NAS. This will lead to incorrect data. No real reason to ever turn those off unless you lack write permissions to a location
User avatar
Posts: 2288
Joined: 22 Aug 2012

Plerry

> This will lead to incorrect data.
I beg to disagree.
At worse, the PC1 => NAS sync will overwrite the NAS version of a file you have just synced NAS => PC2.
So, you may not have the latest version of that file on PC2.
But that will correct itself when you run the next NAS => PC2 sync.
User avatar
Posts: 3611
Joined: 11 Jun 2019

xCSxXenon

> This will lead to incorrect data.
I beg to disagree.
...
So, you may not have the latest version of that file on PC2. Plerry, 22 Dec 2022, 07:55
Not having the latest version is having incorrect data
User avatar
Posts: 2288
Joined: 22 Aug 2012

Plerry

> Not having the latest version is having incorrect data
I can relate to that.
However, in the case of topic starter that is not achieved by just keeping the LockDirectoriesDuringSync flag set to "true", but requires the two syncs to be run in the proper sequence.
I.e.: first run the PC1 => NAS sync, and only then run the NAS => PC2 sync.