RealTimeSync via network

Get help for specific problems
tomas.feistner
Posts: 5
Joined: 15 May 2019

Post by tomas.feistner • 15 May 2019, 19:16

Hello,

is it possible to combine realtime sync folder monitoring with periodical scans? I need to sync local drive with network location and with this I'd prefer to share local files immediately and hourly scan the other side. When I try to start realtime and fire up the complete scan, I'm unable to unlock database file ..

Thanks in advance, Tomas

User avatar
Plerry
Posts: 659
Joined: 22 Aug 2012

Post by Plerry • 16 May 2019, 07:22

Obviously, it is possible to combine RealTimeSync (RTS) triggered FreeFileSync (FFS) syncs with scheduled FFS syncs.
However, the problem occurs when the RTS triggered sync job is started while the scheduled sync job is running or vice versa. Then the directories involved are locked by the job that is already running.
Multiple instances of FFS are quite well able to run syncs in parallel/simultaneously, as long as there is no overlap between the directories involved.
However, in your case you are likely running the exact same sync, so there is a 100% overlap.

There is no real simple fix for this that I am aware of.
Assuming you are running both syncs on the same computer, you can try (if you are proficient in that field) to have RTS and the Task Scheduler start a *.bat or *.cmd (or any other suitable script) instead of directly having these start FFS. That script could then check if an FFS task is running. If not, FFS can be started to run the sync; if yes, the script ends (after all: a sync is already running).
If it is not easy to check if a an FFS task is already/still running, you may use a user defined environment variable flag for that purpose. In the *.bat or *.cmd script:
  • If the flag is set, the rest of the script is skipped
  • If the flag is not already set, then:
  • Set the flag
  • Start the FFS sync
  • After the FFS sync has ended: Reset the flag

tomas.feistner
Posts: 5
Joined: 15 May 2019

Post by tomas.feistner • 21 May 2019, 09:09

Thank you very much for your reply. Obviously, i am able to run realtime and in the same time scheduled sync (when there is no traffic with realtime). So it seems fortunetely there is no 100% overlap. Scripting is possible, but for this really simple task it's too much robust solution.. It would be nice if realtime sync had scheduled full scans included ..

Thank you, Tomas

User avatar
Plerry
Posts: 659
Joined: 22 Aug 2012

Post by Plerry • 21 May 2019, 10:04

You can use RTS to monitor the to-be-synced folder(s), and let RTS launch the FFS-sync upon receiving a change-notification from the OS (as before).

Next to that, you can define a scheduled task that (just) changes a file in one of the RTS monitored folders.
So, you now will have scheduled changes and user caused, randomly timed changes, both of which will trigger RTS to launch your FFS-sync.
There is now only one source launching your FFS sync, RTS, so there is no conflict.

tomas.feistner
Posts: 5
Joined: 15 May 2019

Post by tomas.feistner • 22 May 2019, 20:43

If I understand correctly, that means:
- sync of an exact file initiated by OS detected change (not full scan)
- sync of an exact folder "touched" by scheduled task (also not full scan)
This way there will still be files which has been changed on network location and which remain unsynced .. Because there is no scheduled full scan which detect changes on network side. Am I right?
Exactly, what is the difference If RTS launches .ffs_gui and -ffs_batch? Does it somehow helps here?
Thanks ..

User avatar
Plerry
Posts: 659
Joined: 22 Aug 2012

Post by Plerry • 23 May 2019, 06:44

It seems your understanding is not correct.

RTS is informed by the OS when changes have occurred in the monitored folder(s).
Upon receiving such notification, and not having received further notifications during the selected RTS idle-time, RTS will launch the application specified in RTS. Normally this is FFS running a specific sync.

Once launched by RTS, FFS will always do a full Compare of all folders involved in the sync and their content, and define/suggest sync-actions based on the differences between left and right and the selected sync variant.
So, FFS will always do a full Compare of all folders involved in the sync and does not restrict itself to the changes RTS was notified of.

The "trick" of having a scheduled task force a change in one of the RTS monitored folders is simply way to trigger RTS to launch the FFS sync (after the RTS idle time). This FFS sync then always involves a full Compare, and a sync of all the deltas between left and right (as far as included by the FFS Include filter, and not excluded by the FFS Exclude filter).

tomas.feistner
Posts: 5
Joined: 15 May 2019

Post by tomas.feistner • 31 May 2019, 20:18

Hello, thanks again. Sorry for my delay..

So according to what you say, what I get is full compare in random time periods, right? For me the same thing as if I made for instance full compare every hour..

Actualy are you sure that RTS triggers full compare every time any file is changed? So If I run RTS with FFS of frequently trafficed 100GB folders, I get full compare od these 100 gigs every time anything changes?

Just to make it simplier maybe:
- sync local and remote location with large folders, frequently trafficed folders
- I need to give local files to the other side as fast as possible
- I need to get remote files periodicaly (for instance every two hours)
What is the easiest way to do this?

Thank you in advance, Tomas

User avatar
Plerry
Posts: 659
Joined: 22 Aug 2012

Post by Plerry • 04 Jun 2019, 07:47

tomas.feistner wrote:
31 May 2019, 20:18
… Actualy are you sure that RTS triggers full compare every time any file is changed? So If I run RTS with FFS of frequently trafficed 100GB folders, I get full compare od these 100 gigs every time anything changes? ...
As stated before, RTS only triggers FFS to run a specific sync.
And FFS always runs a full Compare of everything in its sync range (as far as included per the Include filter and not excluded per the Exclude filter)
tomas.feistner wrote:
31 May 2019, 20:18
...what I get is full compare in random time periods, right? ...
Not random. RTS will only launch FFS if changes have occurred in the RTS monitored locations.
tomas.feistner wrote:
31 May 2019, 20:18
Just to make it simplier maybe:
- sync local and remote location with large folders, frequently trafficed folders
- I need to give local files to the other side as fast as possible
- I need to get remote files periodicaly (for instance every two hours)
What is the easiest way to do this?
You have not indicated if changes only originate locally, or may also originate in the remote location.

I will assume changes originate only locally.
I also guess that there is only a pretty limited amount of the local folders (and their subfolders) in which the changes occur that you want to sync to the remote location as fast as possible.
You can then define an RTS task to monitor only those folders, and define an FFS sync job that only syncs those folders (and therefore also only compares those folders). You may even define multiple RTS tasks, one per folder, and a corresponding FFS task (comparing) and syncing just that folder.
As your changes (as assumed) only originate locally, RTS only needs to monitor the local folders, not the remote ones.
You may then define a scheduled task to run an FFS sync on all other folders, and use the Exclude filter to exclude from this scheduled sync the folders monitored by RTS and already synced by the dedicated, separate FFS syncs.

tomas.feistner
Posts: 5
Joined: 15 May 2019

Post by tomas.feistner • 04 Jun 2019, 12:39

Thanks for your reply. The changer occur on both sides, that's the problem. If they only happened locally, I would have no problem to ask for a help with. That would be very simple. And I wanna sync somewhat complex pair of folder, it takes about ten minutes to compare, that's why I dont want to run full compare often, but want to have local (detectable) changes to happen immediately.

I assume we do not completely understand each other and anyway I can somehow solve it just by periodical full comparison, so let's leave this for now ..

Thank you anyway and thanks for your time, Plerry!