Platform information:
OpenBSD 6.2 amd64
$ rsync --version
rsync version 3.1.2 protocol version 31
I'm trying to sync a large directory (4TB) using the following daily.local
file (for Linux admins, this is essentially a cron daily task):
#!/bin/sh
# Sync the primary storage device to the backup disk
/usr/local/bin/rsync -avz /mnt/media_primary/ /mnt/media_backup/
The initial rsync copy takes more than a day. After a day or two, I end up with multiple running copies of rsync in my processes list: new ones are started as scheduled and these new processes seem to be competing with each other and not finishing the task (quickly at least)!
Is there a way to make a new rsync process aware of other rsync processes (or another way to avoid rsync race conditions)?
I know I could just run rsync manually to copy over the directory the first time and/or increase the scheduled time interval. This question is more for my interest as I was unable to find information on the net about this topic.