#906547 rsync: compare-dest with hard links: hangs

Package:
rsync
Source:
rsync
Description:
fast, versatile, remote (and local) file-copying tool
Submitter:
thefoo
Date:
2026-05-19 09:29:02 UTC
Severity:
normal
#906547#5
Date:
2018-08-18 09:53:33 UTC
From:
To:
Hello,

following initial steps:

mkdir dir1
mkdir dir2
mkdir dir3
echo "helloworld" >dir1/file1
rsync -axHAXESW --delete dir1/ dir2/

leave me with 1 file in dir1 and 1 file in dir2.

ln -P dir1/file1 dir1/file2

creates a second file/hardlink in dir1.

Finally. following command:

rsync -axHAXESW --delete --compare-dest=../dir2/ dir1/ dir3/

It doesn't terminate. If aborted with CtrlC, dir3 has both file1 and file2.

What it should do is to not hang, and probably probably create dir3/file2 only (?)

#906547#10
Date:
2026-05-19 09:28:03 UTC
From:
To:
Hello thefoo,
thank you for this excellent an reproducible report.

I can confirm this behavior exists also in rsync 3.4.1 (Debian 13,
current stable).

I checked the upstream bug tracker and couldn't find a similiar issue. I
suggest you report this to upstream and link both tickets together.

Thank you
Christian Buhtz