ADSM-L

Re: (U)Symbolic links in archives?

1998-09-10 20:17:33
Subject: Re: (U)Symbolic links in archives?
From: Brian D Chase <bdc AT WORLD.STD DOT COM>
Date: Thu, 10 Sep 1998 17:17:33 -0700
"S.F.Westbroek" wrote:

> This is a known problem and I agree it should be reported and fixed. To
> create a workaround (I can't remember the exact implementation) a
> programmer in a previous project of my created a C program which looks
> for symbolic links and based on a given parameter removed it before
> starting the backup/archive. But before removing it, the symbolic link
> is registered and saved in a log. Running the program with another
> parameter restored all symbolic links that have been removed.

We've got a perl script to do the same.  I sort of like the following
though if you're using the GNU version of tar:

% cd dirname ; find . -type l -print -exec rm {} \; > /tmp/link.list ; \
  gnutar cvfT links.tar /tmp/link.list ; rm /tmp/link.list

Where "dirname" is the directory you intend to archive.  Then from there
you can safely run the "dsmc archive" command on that directory.  When you
later retrieve the archive, you then just have to untar the links from the
"link.tar" file which gets retrieved with everything else.

-brian.
=========================================================================