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

Re: tar ate my symlinks



Brian Victor <bhv1@psu.edu> writes:
> 
> I believe you're right.  It was "exiting now" when untarring /proc,
> which apparently prevented it from finishing the job.
> 
> >        tar -jtvf linuxbackup.tar.bz2 | egrep '^l' | \
> >           perl -lane 'print "ln -snf $F[7] $F[5]" if (@F == 8 && $F[6] eq "->")' \
> >           > FIX_MY_SYMLINKS
> 
> This gave me warm unix fuzzies like you wouldn't believe.

I'm glad it worked, but since you went this route, be extra careful
that there were no more files after that "exiting now" error that you
missed restoring!

> One last question.  I'm planning on doing a similar procedure to my
> other machine.  Is there anything other than /proc that I need to
> exclude?  I was surprised to find that /dev made it through intact.

It'll depend on your kernel and what other "special filesystems"
you've mounted.  If you run "mount" without options, it'll list what's
mounted, and you can figure out what isn't a real filesystem from
there.  In addition to "proc", you might see "usbdevfs", "devpts", and
"shm" filesystems that shouldn't be copied.

-- 
Kevin Buhr <buhr@telus.net>



Reply to: