Friday, June 2, 2006

Backing up an Ubuntu System the sane way

http://lists.debian.org/debian-devel/2002/07/msg02232.html


"dpkg --get-selections>list_of_selections.txt" can backup a Debian user's
list of currently selected packages. "dpkg
--set-selections<list_of_selections.txt" to start a system restore, iff
packages are available. Some packages get removed from the Debian archive
( http://ftp-master.debian.org/removals.txt has recent examples), if
following unstable or testing, then you may want to use dpkg-repack or
grab a copy of the packages you are worried about.
http://archive.debian.org may also be helpful.


I'm also making a backup of my /etc directory, this has the password database that won't be good on the next system but I use this for reference.
sudo tar zcvf apt.tgz /etc/

-----------------------------------

Unfortunately, I messed up and ran the first selection on the new system which copied the new systems dpkg list over the saved copy. Now, I cannot vouch for this working