Restoring a Debian System

For many years on all Linux systems I use I maintain a log of installed packages.

I use a cron job and a shell script wrapper to maintain the log. On Debian systems the essential command looks like this:

dpkg -l | egrep '^ii|^hi' | awk '{print $2,$3}' > $INSTALLED_SOFTWARE_LOG

Backups ensure I always have a copy of that log.

Should I need to rebuild a system I can perform a minimal install and then install desired packages from the log file. Something like this:

apt -y install $(awk '{print $1}' $INSTALLED_SOFTWARE_LOG)

I would still need to restore user profiles and /etc configuration files from backups, but the installed base system would be complete.

Posted: Category: Usability Tagged: Debian

Next: Acronyms

Previous: Dual Booting