File not updated if it exists in leftover .~tmp~

Andreas Kempe kempe at
Wed Jan 6 16:08:08 UTC 2021

Hello everyone,

I'm responsible for the mirror at and noticed that
the file pub/voidlinux/current/x86_64-repodata was a couple of weeks
behind the file found at the mirror we're syncing from despite our
rsync logs claiming it had been updated.

We're running rsync with --delay-updates, see full command below, and
I found that we had a leftover .~tmp~ directory in
pub/voidlinux/current, possibly from restarting the machine
mid-update, which contained the x86_64-repodata file. rsync would
update the file in .~tmp~ but never move it out to its proper place.

I can reproduce this behaviour by the following steps:
1. mkdir rsynctest && cd rsynctest
2. mkdir .~tmp~
3. touch -d '1 month ago' .~tmp~/x86_64-repodata # Make the file in .~tmp~ one month old
4. touch -d '5 months ago' x86_64-repodata # Make the file we're updating at ./x86_64-repodata five months old
5. rsync -vrlt --hard-links --delete --delete-delay --delay-updates --ignore-errors --stats --progress --chmod ug+w,o-w,+rX ./x86_64-repodata

The rsync used both on the server and for my tests have been version
3.2.3 on FreeBSD and Void Linux.

After performing the sequence above, the file in .~tmp~ will have been
updated, but not the actual file at ./x86_64-repodata. Removing
.~tmp~ and rerunning the command in step 5 will update the file as

If one generates log output, the log gives no indication of anything
having gone wrong. Here's an example from a sync before I fixed the
issue on our server by removing .~tmp~:

2021/01/06 14:03:42 [56065] > current/x86_64-repodata

From reading the man page, I haven't been able to determine whether
this is an expected behaviour that I can affect. The behaviour I would
want is for the actual files to always be updated regardless of what
might be in the .~tmp~ folder.

Any input is greatly appreciated!
Andreas Kempe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <>

More information about the rsync mailing list