Bug 10334 - rsync doesn't log hardlink-copies using --link-dest
rsync doesn't log hardlink-copies using --link-dest
Status: RESOLVED WORKSFORME
Product: rsync
Classification: Unclassified
Component: core
3.0.9
All Linux
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-19 11:16 UTC by Andreas
Modified: 2014-01-20 12:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2013-12-19 11:16:01 UTC
If I perform a backup like this, new files in $dest which hardlink to $link doesn't result any output on tty or logfile, even if I use -v or -i.

rsync -ahv --link-dest=$link $source $dest

-----------------------

EXAMPLE: Without using --link-dest => everything works fine

rsync -ahv $source $dest

sending incremental file list
source/
source/file1
source/file2
source/file3
source/file4

sent 420 bytes  received 92 bytes  1.02K bytes/sec
total size is 130  speedup is 0.25

-----------------------

EXAMPLE: Using --link-dest => Files get copied (hardlinked), but I don't get any information:

rsync -ahv --link-dest=$link $source $dest

sending incremental file list
source/

sent 118 bytes  received 16 bytes  268.00 bytes/sec
total size is 130  speedup is 0.97
Comment 1 Paul Slootman 2013-12-19 11:21:42 UTC
Have you tried -i option? (itemize-changes)
Comment 2 Andreas 2013-12-19 11:34:07 UTC
(In reply to comment #1)
> Have you tried -i option? (itemize-changes)

Thanks for your quick response.
Yes, I did, but it makes no difference

-------

rsync -ahiv --link-dest=$link $source $dest

sending incremental file list
.d..t...... source/

sent 118 bytes  received 16 bytes  268.00 bytes/sec
total size is 130  speedup is 0.97

-------
Comment 3 Kevin Korb 2013-12-19 17:56:05 UTC
Specify --itemize-changes twice.  This works for -v as well but it works better on --itemize-changes.
Comment 4 Wayne Davison 2013-12-19 23:10:03 UTC
This is as-designed, since a link-dest copy outputs just the changes.  Think of it as "what would rsync output if we actually copied into the link-dest dir", but with the copy going into a new directory.  Sadly, the --delete option does not work properly (it doesn't mention files that went away compared to the prior link-dest dir).

As mentioned, specifying -ii mentions even unchanged files, and this output will output enough information for you to be able to see that they are being hard-linked.
Comment 5 Andreas 2014-01-20 12:59:33 UTC
Thank you very much for your support!

-ii results much more output as I wanted to, but it seems that there is no better way. Would be a nice fix in further versions.