Bug 1511202

Summary: rsync does not think anything changed if a hardlink is made
Product: [Fedora] Fedora Reporter: rmarshall
Component: rsyncAssignee: Michal Ruprich <mruprich>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: code, luhliari, mruprich, redhat, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-15 09:06:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rmarshall 2017-11-08 22:04:03 UTC
Description of problem:
When running an rsync, if a hardlink is made no change notification is made.

Version-Release number of selected component (if applicable):
3.1.2

How reproducible:
Every time

Steps to Reproduce:
mkdir -p /tmp/test_sync/{directory_a,directory_b}

echo "Hello Sync" > /tmp/test_sync/directory_a/foo.txt

/usr/bin/rsync --delay-updates -F --compress --archive -H --link-dest=/tmp/test_sync/directory_a --out-format="<<CHANGED>>%i %n%L" /tmp/test_sync/directory_a/foo.txt /tmp/test_sync/directory_b/foo.txt

Actual results:
Sync works, but no output message

Expected results:
Output <<CHANGED>>hf[etc]

Comment 1 Kevin Korb 2017-11-14 16:39:23 UTC
This is expected...

Since your link-dest and source dir are the same rsync isn't copying anything so it has no changes to itemize.  All it is doing is making hard links which are not considered changes.  Give it an empty link-dest dir and you will get your output back.  If you want everything including non-changes itemized you can use -ii but then your "<<CHANGED>>" string will be wrong.

Comment 2 Michal Ruprich 2017-11-15 09:06:04 UTC
Thanks Kevin. Since this is expected behaviour I'm closing this bug as NOTABUG.