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

Restore a debian backup



Hi,

I'm looking for the right way to restore a backuped debian system: The
main system ist archived by "dar", excluding all binaries in /sbin, /bin
and the complete /usr directory. There is a list of alle installed
packages, retrieved by dpkg --get-selection
The backup medium (harddisk) contains a very fundamental debian/woody
system.

For the moment, I would consider the following to restore the system:

* Boot the backup drive, fdisk & mkfs the new drive and mount it
(/mnt/restore for example).

* copy the running woody system to the new drive, in order to obtain a
runnable system

* restore the backup

* chroot to /mnt/restore

* apt-get update && dpkg --set-selection, apt-get dselect-upgrade and
install

* lilo && reboot

My concern is about restoring the backup before re-installing the
packages. Wouldn't that let dpkg think that all packages are installed
correctly? (Because /var/lib/dpkg/status) Note that the other order,
first install, than restore would not be a lot better: The backup might
contain package versions that might be different from the ones installed

Is it save to exclude
/var/lib/dpkg from the backup as long as a package list is available?

Second question: Is there a (direct) way to re-install a package without
having to remove and install it again? For example, if
/usr/share/doc/$PACKAGE got lost and removing/installing is difficult
because of dependencies.

Regards and TIA,
Erhard





Reply to: