How to prevent overlapping instances of sync?

What is the problem you are having with rclone?

I have a scheduled job on OpenMediaVault that I have set to run hourly to sync to my googledrive. How do I prevent a new instance of sync running if the previous instance has not finished running yet?
Is there a flag or additional parameter I can add to my command to check if an instance is already running and should wait for that to finish before running another sync?

What is your rclone version (output from rclone version)

  • rclone v1.51.0
  • go version: go1.13.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

  • os/arch: linux/arm

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync /srv/dev-disk-by-label-NAS/GoogleDrive cloudDrive: --progress

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

An easy option would be to add -rc to your sync and that would prevent another from running because the port by rc is taken. Other options would be to use shell commands to detect its already running. This is really an OS thing.

Ok, thanks! I will try adding -rc.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.