ADSM-L

Re: Re[2]: (U)Symbolic links in archives?

2015-10-04 17:53:21
Subject: Re: Re[2]: (U)Symbolic links in archives?
From: Brian D Chase [SMTP:bdc AT WORLD.STD DOT COM]
To: ADSM-L AT VM.MARIST DOT EDU
Eric LEWIS wrote:

>      To me they are just one more file.  If I backup the whole machine
then
>      the file and the symbolic link get backed up.  To do a bare-metal
>      restore then certainly the links need to be treated as a file.  So
the
>      default should very definately be NO - don't follow the link.

The backups behave fine as far as I can see.  It's the archive
functionality which is busted.

>      An OS device that can cause endless loops does not seem very well
>      founded to me but I suppose now we got to live with it.

Well, the implementation of symbolic links under Unix is such that it's
pretty easy to detect when you're dealing with one.  The Unix "stat" and
"lstat" system calls return information about the file mode.  This can be
checked to see whether or not you're dealing with a symbolic link.

[spoken under my breath...] Properly implemented Unix softwares for which
  looped links are a concern are able to deal with symlinks without
  problems.  This is simply because they check for them using the
  information from stat'ing the file. ahem.

The hard case to handle is for loop detection when you *want* to follow
the links.  That's where you have to recognize the loops and then break
out of them at the appropriate point.

And things only get ugly when you loop your hard links, which are by
design indiscernable from normal files.  However, I don't think any
current Unix allows you to make a hard link to a directory, not even as
the root user. (I've tried.) I think they stopped that nonsense after 7th
edition Unix of the late 70's. :-)

-brian.
=========================================================================
<Prev in Thread] Current Thread [Next in Thread>