Here’s a good method for saving and restoring a Debian installation. Of course, you have all data from /home on a partition of its own, and the configuration files in /etc are backed up. You naturally have saved a copy of your sources.list.
First, save the package states while the system is still working well:
dpkg --get-selections > (filename)
After a disaster, you can now restore the system to its original state: install a minimal system (no packages beyond the base system). Then:
dpkg --set-selections (filename)
apt-get dselect-upgrade
apt-get dist-upgrade
apt-get upgrade

Now you can just slam the configuration files to /etc from your backups.

Comments

Comments are closed.

Switch to our mobile site