Page 1 of 1

Best way to configure Syncovery on multiple machines that sync with each other to avoid conflicts

Posted: Thu Feb 20, 2025 1:55 pm
by IMTheNachoMan
I'm wondering if there are specific settings that link Syncovery on different machines so we can say things like don't run this profile on this machine until a profile on another machine is done.

This is my setup:
  • Linux server: serve
    • exposes a share: /data
  • Linux client: desk
  • 2x Windows clients: lap and nam
And my Syncovery setup:
  • On serve:
    • Job 1: one-way, exact mirror, backup of /data to Backblaze B2
    • Job 2: two-way, smarttracking, sync between /data to Google Drive
  • On the Linux client:
    • Job 1: two way, smarttracking, sync between desk:/home/nacho/data and serve:/data
  • On the 2x Windows clients:
    • Job 1: two way, smarttracking, sync between C:\Users\nacho\data and serve:/data
Everything works fine. But I'm worried that, depending on timing/schedule, two profiles on different machines may clash. For example:
  • Job 2 on serve is running
  • Job 1 on desk is running
  • Job 1 on lap is running
So I'm wondering if the best way to configure this? Maybe some way to tell each profile on each machine to pause/wait until all active jobs on other machines are done? Maybe each job on each machine can create a temp file that the jobs on the other machines check for, and if that file exists then the profile execution waits.

Re: Best way to configure Syncovery on multiple machines that sync with each other to avoid conflicts

Posted: Fri Feb 21, 2025 1:23 pm
by IMTheNachoMan
I had a thought.

The OnCanRunProfile function, what happens after the postponed time is up? Does it run OnCanRunProfile again or will it then run the script?

My thought was before a profile starts, use OnCanRunProfile to check if a file exists. If the file exists it waits and checks again in a minute. If the file does not exist, it creates the file and runs the profile.

Does this make sense?

Re: Best way to configure Syncovery on multiple machines that sync with each other to avoid conflicts

Posted: Fri Feb 21, 2025 3:26 pm
by tobias
Hello,
to avoid problems with jobs that can run at the same time, it is usually sufficient to activate the option "Automatically resume (copy with interim filenames, keep incomplete files when stopped)" on the Files tab sheet.

Because Syncovery will use temporary files, there is no risk that another job will try copying an incomplete file.

However yes, you can use a signal file on a network share to prevent jobs from running simultaneously. It will involve implementing multiple PascalScript hook functions, not just OnCanRunProfile. I'll see if I can have a go at this project.

Yes, OnCanRunProfile will be queried again when the postpone delay is over.

Re: Best way to configure Syncovery on multiple machines that sync with each other to avoid conflicts

Posted: Fri Feb 21, 2025 3:40 pm
by IMTheNachoMan
tobias wrote: Fri Feb 21, 2025 3:26 pm sufficient to activate the option "Automatically resume (copy with interim filenames, keep incomplete files when stopped)" on the Files tab sheet.
Got it. Thanks!
tobias wrote: Fri Feb 21, 2025 3:26 pm It will involve implementing multiple PascalScript hook functions, not just OnCanRunProfile
If you tell me what other hook functions you think I'll need, I can take a stab at writing the script. I enjoy doing fun scripting like this.
tobias wrote: Fri Feb 21, 2025 3:26 pm Yes, OnCanRunProfile will be queried again when the postpone delay is over.
Wonderful!