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

Re: harddrive crash recovery? (/var)



On Fri, Aug 16, 2002 at 08:46:09PM +1000, Russell wrote:
> "D. Clarke" wrote:
> > 
> > here's a tricky debian question... is there an "easy" way to get debian to
> > recreate all the directories/symlinks/andotherstuff that's supposed to be in
> > /var in accordance to what packages are installed? :)
> > 
> > Probably not, considering all the package information was stored in /var too
> > eh? :)
> > 
> > My 8 gigger just blew up and I can't recover anything off of it, and now my
> > system is pretty much hosed.  But I don't want to wipe/reinstall the entire
> > thing, however if I can get the base /var structure setup and run apt apps
> > and re-install every package that i have without killing the old configs,
> > that would be very handy...
> > 
> > Any ideas are welcome of course...
> 
> I haven't tried it, but dpkg has options like audit/upgrade/etc that
> might recreate those things. I found the easiest way to make regular
> backups is to install a rack so you can swap hard-disks and make
> complete system backups.
> 

Have a look in the directories under /usr/share/doc - most (if not all)
packages will create a directory under there. So the presence of
/usr/share/doc/foobar means that you have foobar installed. However, it
won't tell you which *version* of the package you've got.

You *might* get away with copying /var/lib/dpkg/* from another box, and
then forcibly re-installing all the packages you know you have installed
(according to /usr/share/doc). And then forcibly de-install any packages
that dpkg *thinks* you have, but you're sure you don't. No guarantees
whatsoever; I haven't even tried this myself.

Basically, the trick will be to get dpkg's idea of what's installed "in
sync" with what *really* is installed.

PS: There might be other important stuff under /var. However, I *think*
    that a full re-install of all  of the packages should take care of that.

HTH, YMMV
-- 
Karl E. Jørgensen
karl@jorgensen.com
www.karl.jorgensen.com
==== Today's fortune:
Linux: Where Don't We Want To Go Today?
	-- Submitted by Pancrazio De Mauro, paraphrasing some well-known sales talk

Attachment: pgpFF9nWZYCVL.pgp
Description: PGP signature


Reply to: