You can ensure that only one instance of that rsync
runs by using a lock file. util-linux
includes a file locking wrapper called flock
, which you can use in your crontab like so:
* * * * * /usr/bin/flock -n '/tmp/example.lock' -c 'rsync -azP /local_path [email protected]:/remote_path' > /dev/null