RealTimeSync via network

Get help for specific problems
tomas.feistner
Posts: 2
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: 613
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: 2
Joined: 15 May 2019

Post by tomas.feistner • Today, 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: 613
Joined: 22 Aug 2012

Post by Plerry • Today, 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.