Linux Ubuntu Cookbook
Backup / Restore, Clone
Aptitude Package Dump & Auto-Installation
To dump the list of packages you currently have installed into the file ~/my-packages, you can do:
aptitude --display-format '%p' search '?installed!?automatic' > ~/my-packages
The file ~/my-packages will have the complete listing of the packages you have installed in each line, but not the packages itself. How can this be useful in cloning or restoring?
Well, the aptitude can be fed this file and it will automatically wakes up, download and install everything that is in that file by this command:l
sudo xargs aptitude --schedule-only install < my-packages ; sudo aptitude install
This command can be run from a different machine, thus essentially cloning the packages. The only downside is that you still have to download all that packages, and the configuration, setup and everything is not actually saved.
Networking
BIND9 for Local DNS Server
This configuration is very useful if you want to have a box that can be used as a dedicated DNS server
Direct from Wikipedia:
BIND (pronounced /ˈbaɪnd/), for Berkeley Internet Name Domain, or named /ˈneɪm.diː/, is the most commonly used Domain Name System (DNS) server on the Internet.[1] On Unix-like systems it is the de facto standard.
Installation:
sudo apt-get install bind9
Ubuntu will configure & install bind9 for you. Now this bit is important, if you stuffed up anywhere and wish to start over, a clean reinstall can be done via this command:
sudo apt-get remove --purge bind9; sudo apt-get install bind9