DO NOT REPLY [Bug 3693] rsync can use same --link-dest file several
times, leading to incorrect hard links
samba-bugs at samba.org
samba-bugs at samba.org
Mon Apr 17 20:23:20 GMT 2006
https://bugzilla.samba.org/show_bug.cgi?id=3693
------- Comment #2 from hashproduct at verizon.net 2006-04-17 15:23 MST -------
(In reply to comment #1)
> the contents are the same but some of the meta information is not.
Oops: the mtimes were different. Now I'm not sure how I tickled the bug the
first time. Corrected script:
mkdir src dest linkdest
touch src/f1
rsync -a src/f1 src/f2
rsync -a src/f1 linkdest/f1
ln linkdest/f1 linkdest/f2
rsync -Ha src/ dest/ --link-dest=../linkdest/
> > Rsync links linkdest/f1 instead of copying src/f1 and links linkdest/f2
> > instead of copying src/f2. Now dest/f1 and dest/f2 refer to the same
> > file while src/f1 and src/f2 refer to different files.
>
> can you post the output inline with commands as i'm not seeing this here...
Please try again with the corrected script. On my computer, "find . -ls" after
the corrected script has finished produces the following output (some spaces
removed to make it narrower):
1908 0 drwx------ 5 matt matt 120 Apr 17 16:11 .
482092 0 drwx------ 2 matt matt 96 Apr 17 16:11 ./src
482105 0 -rw------- 1 matt matt 0 Apr 17 16:11 ./src/f1
482106 0 -rw------- 1 matt matt 0 Apr 17 16:11 ./src/f2
482098 0 drwx------ 2 matt matt 96 Apr 17 16:11 ./dest
482107 0 -rw------- 4 matt matt 0 Apr 17 16:11 ./dest/f1
482107 0 -rw------- 4 matt matt 0 Apr 17 16:11 ./dest/f2
482101 0 drwx------ 2 matt matt 96 Apr 17 16:11 ./linkdest
482107 0 -rw------- 4 matt matt 0 Apr 17 16:11 ./linkdest/f1
482107 0 -rw------- 4 matt matt 0 Apr 17 16:11 ./linkdest/f2
> # i modified the erroneous[?] link-dest usage of both a relative and a
> # nonexistant path. in the past i had problems with relative. should
> # rsync complain about nonexistance with -v?
No, my --link-dest usage is correct. The description of --link-dest=DIR says,
"If DIR is a relative path, it is relative to the destination directory."
Please try my corrected script and see if the rest of your remarks still apply.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the rsync
mailing list