On Tue, Oct 28, 2014 at 09:36:09 +0100, Stefan G. Weichinger wrote:
> 
> If I use amgtar as amanda application, how does it handle hard links?
> 
> A customer tells me he has some pictures in a website and does hardlinks
> to save space.
> 
> When he restores from amanda he gets several copies of one and the same
> picture and no hard links created?
> 
> Is that expected behavior? How to handle this?

GNU tar as called normally by Amanda will automatically detect files
with multiple hard links and will add the second-and-later references to
the archive as links to the first name processed.  (See 
  http://www.gnu.org/software/tar/manual/html_node/hard-links.html
for further details.)

However, this only works if the various references to that file are
included in the same DLE (and thus are backed up together in a single
tar run).  

If that requirement is met in your customer's case, there's probably
something more subtle going on... in which case it would be helpful to
know the OS/distribution/Amanda/tar versions involved, a bit more about
how the website directories are set up and the DLE that backs them up,
and the exact sequence of operations he used when trying to do the
restore....


> I read about "-h" and "-H" for gnu-tar, but that influences the *backup*
> not the restore.

(Note that "-h" is an alias for "--dereference" and specifies behavor
related to symbolic links, while "-H" is unrelated [it's an alias for
--format].  There is a "--hard-dereference" option [with no
single-letter alias], but in this use case you specifically don't want
to dereference the hard links so you wouldn't want to use that option.)


                                                        Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to