Trying to diagnose incomplete file transfer

Hardy lists at
Sun Mar 5 11:30:16 UTC 2023

I second Francis here. You don't need to diagnose incomplete file transfers as long as you have racing conditions as you described. This leads to strange result inevitably.
NEVER start several rsync jobs manipulating the same data - especially if there are modifications to BOTH sides source and destination.

You do not necessarily define a service like Francis suggests. A simple semaphore approach suffices. Perhaps even something like

# ps fax | grep -v grep | grep $0 && exit

to prevent this exact command "$0" to start concurrently.


Am 04.03.23 um 08:38 schrieb Francis.Montagnac--- via rsync:
> Hi.
> On Sat, 04 Mar 2023 00:39:52 -0600 Albert Croft via rsync wrote:
>> The rsync commands may be launched from command-line or cron, but use
>> the same format and options in either case. As a result, there may be
>> multiple rsync processes pulling files from the same remote path to the
>> same local path.
> I think you should first prevent this to happen.
> If your receiving machine is using systemd:
>    - define a X.service for doing the rsync
>    - define a X.timer unit to replace using cron
>    - launch from the command line with: systemctl start X
>      - this will not start a new rsync if one runs already (if X.service is
>        running)

More information about the rsync mailing list