I had noticed the --link-by-hash patch a short while back & decided it was time to experiment with it. Sadly, its behaviour is considerabely different from what I expected - to the point that I find it unusable in its current form. I had hoped to use it both for my rotating backups & for my (unofficial) slackware mirror. For the test itself, I did the following: - created 3 directories in /tmp/: src/ dst/ hash/ - put a random small file in src/, then made 3 non-hardlinked copies which differ by date, owner & group, last modified date. - gained root, issued the following command: [root@lithium ~]# /home/erik/pkg/pre/usr/bin/rsync -aPv --link-by-hash=/tmp/hash /tmp/src/ /tmp/dst/ The result: [erik@lithium ~]$ ls -l /tmp/src/ total 16 -rw-r--r-- 1 erik users 395 2004-09-14 17:07 orig -rwxrwxrwx 1 erik users 395 2004-09-14 17:07 orig+mode* -rw-r--r-- 1 nobody nogroup 395 2004-09-14 17:07 orig+owner.group -rw-r--r-- 1 erik users 395 2004-09-22 04:25 orig+time [erik@lithium ~]$ ls -l /tmp/dst/ total 16 -rw-r--r-- 5 erik users 395 2004-09-14 17:07 orig -rw-r--r-- 5 erik users 395 2004-09-14 17:07 orig+mode -rw-r--r-- 5 erik users 395 2004-09-14 17:07 orig+owner.group -rw-r--r-- 5 erik users 395 2004-09-14 17:07 orig+time (The 5th link being the hash file itself) My question is simple enough. Are there plans to make --link-by-hash pay attention to file externals? Erik -- Registered Linux User Number 140066 http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=140066 "Failure is not an option. (It comes bundled with Windows.)" "If it ain't broke, overclock it."
On Wed 22 Sep 2004, Erik Jan Tromp wrote:> I had noticed the --link-by-hash patch a short while back & decided it was time to experiment with it. Sadly, its behaviour is considerabely different from what I expected - to the point that I find it unusable in its current form. I had hoped to use it both for my rotating backups & for my (unofficial) slackware mirror.[ snip demo ] Hmmm... For a slackware mirror I expect that it would be fine. I tried downloading the patch from the web cvs, but I got this: Error: Unexpected output from cvs co: cvs [checkout aborted]: Absolute module reference invalid: `/rsync/patches/link-by-hash.diff' Check whether the directory /cvsroot/CVSROOT exists and the script has write-access to the CVSROOT/history file if it exists. The script needs to place lock files in the directory the file is in as well. Paul Slootman
On Wed, Sep 22, 2004 at 04:54:32AM -0400, Erik Jan Tromp wrote:> Are there plans to make --link-by-hash pay attention to file externals?The issue has come up before: http://lists.samba.org/archive/rsync/2004-February/008630.html I don't know of any plans for changing the --link-by-hash patch, but if someone is interested in working on it, I can integrate changes into it. One simple change would be to prime the computed hash using some external data (e.g. uid, gid, and/or mode), but it sounds like at least the original creator would like this to be optional. ..wayne..
Maybe Matching Threads
- 2.6.1pre-1 Segmentation fault & other fun
- odd behaviour change (2.6.3 > 2.6.4pre3)
- 3.0.0pre2: non-recursive remote listing breakage
- 3.0.0pre2(cvs) error: check_for_finished_files: Assertion `flist != ((void *)0)' failed.
- To inc_recurse or not to inc_recurse? [Re: 3.0.0pre2: bookend breakage (2 different errors)]