Bug 1511202 - rsync does not think anything changed if a hardlink is made
Summary: rsync does not think anything changed if a hardlink is made
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rsync
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Ruprich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 22:04 UTC by rmarshall
Modified: 2017-11-15 09:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-15 09:06:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.