[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar ate my symlinks



On Mon, Mar 17, 2003 at 09:43:09AM -0800, Vineet Kumar wrote:
>* Brian Victor <bhv1@psu.edu> [20030317 07:52 PST]:
>> I backed up my debian installation with the following:
>> 
>> tar --preserve -cv / | ssh 192.168.2.10 'cat > linuxbackup.tar.bz2'
>
>That .bz2 extension on that file is misleading.  The usual extension for
>uncompressed tar archives (which is what this line creates) is .tar .

Oops, s/cat/bzip2/, as you figured out.

>> Both commands were run as root.  However, I now have a *lot* of broken
>> symlinks, which show up like this:
>> ----------    1 root     root            0 Mar 17 13:19 xdvi.bin
>> ----------    1 root     root            0 Mar 17 13:19 xmlproc_parse
>> ----------    1 root     root            0 Mar 17 13:19 xmlproc_val
>> ----------    1 root     root            0 Mar 17 13:19 yacc
>Very strange.  What type of filesystem are you running on?  Any peculiar
>mount options?

/dev/hda4 on / type ext3 (rw,errors=remount-ro)

>Can you tell if the tarball actually has the symlinks in it but the
>restore messed up, or if the files are stored incorrectly and restored
>correctly?

I don't know; is there any way to tell that in a compressed (or even a
decompressed) tarball?

>Then, in order to preserve them, you'll probably need another debian
>installation to figure out what they're supposed to be.  Another thing
>you could try is to reinstall all of your packages.  I would guess that
>this would take care of most of them.

Yes, but it's difficult when some fundamental programs like awk, csh,
and yacc are broken.  It's hard to tell what needs to be reinstalled
first.  Also, as far as I can tell, I have to uninstall before
installing again, which can cause dependency messes.

I do have another debian box in a similar state, so the manual method
may indeed be the best.  Thanks!

-- 
Brian



Reply to: