On Fri, Jul 25, 2014 at 02:45:50PM -0400, Gene Heskett wrote:
> Greetings;
> 
> It turns out some of my backups for this machine will not be usable, 
> particularly for a bare metal recovery on a new drive, due to a miss-
> understanding of the --one-filesystem option by tar-1.27, and 1.27.1 does 
> not fix it.
> 
> The problem is that this system is currently installed with two 
> partitions, 3 actually if you count swap space.
> 
> They are /boot, and /
> 
> So tar refuses to back up a softlink that points to a directory/file  that 
> is in a different dir than the current disklist entry points to, EVEN 
> THOUGH IT IS IN FACT on the same filesystem.
> 
> The config I've been using for a decade and change uses that option 
> command.  Will removing it (--one-filesystem) from my config fix this 
> missing links in the backup problem?  Or will that result in its making a 
> duplicate backup file of what is at the end of that softlink?
> 
> IMNSHO, when tar encounters such a link, instead of making a backup of 
> that file at the end of the link, it should backup the contents of the 
> links text so that an amrecovery will re-create the link file.
> 
> It is not doing that either, so how do, or can, I force tar to do that and 
> result in a fully usable backup?
> 
> This does not seem to me to be a violation of the one filesystem command, 
> making sense ONLY if the link is to a different partition, which could be 
> a different filesystem, which this present situation is most certainly 
> not.  Different directory yes, different filesystem, no.

I don't think --one-file-system has anything to do with it.  That option
deals with encountering a directory that is on another filesystem and
whether tar should backup what is in, and below, that directory.

The option for dealing with symbolic links is --dereference (-h).
Without that option the symbolic link is archived regardless of
the location of the target and regardless of the --one-file-system
option.  With the --dereference option the target is archived,
again regardless of location and --one-file-system option.

Jon
-- 
Jon H. LaBadie                 [email protected]
 11226 South Shore Rd.          (703) 787-0688 (H)
 Reston, VA  20190              (609) 477-8330 (C)

Reply via email to