On 01/05/11 13:58, Michael Lawrence wrote: > If I understand you correctly, with -h there should be no links > within the archive, i.e., there are two copies of foo in the > archive. This is not how tar >= 1.24 behaves.
I'm afraid it's not that simple. -h prevents *soft* links in the archive, but it doesn't prevent *hard* links: $ touch foo $ ln foo foo-hard $ ln -s foo foo-soft $ ls -l foo-hard foo-soft -rw-r--r-- 2 eggert eggert 0 Jan 5 15:02 foo-hard lrwxrwxrwx 1 eggert eggert 3 Jan 5 15:03 foo-soft -> foo $ tar chf x.tar foo-hard foo-soft $ tar tvf x.tar -rw-r--r-- eggert/eggert 0 2011-01-05 15:02 foo-hard hrw-r--r-- eggert/eggert 0 2011-01-05 15:02 foo-soft link to foo-hard This behavior is the same in tar 1.22 and 1.25 (I just checked). What's different in tar 1.24 and later, is that tar's behavior does not change based on whether foo-hard's link count is 2 or more. As Joerg Schilling notes, earlier versions of GNU tar treat foo-soft differently if foo-hard's link count is 1. However, this was a bug in GNU tar. As far as I can tell, this issue is irrelevant to Amanda. The problem with Amanda that Gene Heskett is referring to was fixed in a November 22 patch <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00089.html>. It may be time to distribute a new version of GNU tar, which incorporates that patch.
