Dan Christensen <[EMAIL PROTECTED]> [2002-10-21 23:23:25 -0400]:
> Luckily, before running each backup I save the output of "dpkg -l" in
> /root, so I have a list of all installed packages and what version is
> installed.

I would ignore the versions unless you really care about something in
particular and just use the list of versions installed.

> Is it possible to use this information to recreate the data dpkg needs
> to operate?  What exactly is needed?

I would compare the list with a list of what you just installed, diff
them, and install the as yet uninstalled packages.

> [I realize that I could just reinstall all the packages from scratch.
> But that would entail answering lots of debconf questions, and doing a
> lot of merging of conffiles since many packages will have been updated
> since the laptop was lost.  (It was a while ago and I follow testing.)
> So I'm hoping to avoid a reinstall.]
> 
> After getting dpkg working, are there any suggestions about how to
> restore the other parts of /var?

Hmm...  You rebuilt the machine from backup and therefore dpkg is not
functional at this time?

> Thanks for any advice.  Please cc me on replies.

Probably what I would do is this.  This is me and you will just have
to take the advice at face value and work with it.

I would install a minimal Debian system from scratch.  This ensures a
working dpkg.  Then I would restore /etc from backup which contains
all of the configuration files and personality of the previous system.
Also restore /usr/local and /home and anything you may have installed
elsewhere such as /opt.

Then I would install all of the packages that I was missing.  After
doing the reinstall I would 'diff -ru /backup/etc /etc' and possibly
reset anything that I incorrectly answered during the interactive
install, possibly by restoring /etc again to correct those files.
Assuming that the backup of those files was good to begin with.  This
might be a good time to do spring cleaning.  Reboot.  The system
should boot and look pretty close to your old system.

A package which is installed that sees a configuration file already
present in /etc _should_ avoid asking you questions and just use that
configuration file.  However, each package will have varying quality
there and many will still ask you a zillion questions all over again.
(Some like am-utils will ask a bunch of questions which you must
answer, then after asking see the previous configuration file and only
then give you the opportunity to use the previous file discarding the
answers you were forced to answer but did not need to.  Sigh.)  In
general Debian packages are way to chatty and ask way too many
questions during an install.  You just have to put up with it in many
cases.  If you plan to reset /etc after doing all of the installs
again then what you answer probably won't matter since they will get
overwritten.

Again, this is what I would do.  YMMV.  Good luck!

Alternatively you could do this just to get a good copy of /var which
matches what is on your system.  Back that up.  Then restore the old
everything else with the new /var onto your system.  If you had a
spare disk so as not to undo your present restore that would seem
feasible.

Bob

Attachment: msg08329/pgp00000.pgp
Description: PGP signature

Reply via email to