Apt-get :: Backup apt-get installs?



Anyone know which directories etc to add to the backup list to enable a backup of any programs you install via apt-get?  Is there some way perhaps of automatically generating a file list of what programs / libraries came from the original install, then doing a comparison and backing up any files not on the list?
Any ideas would very much come in handy for those of us who have spent several hours apt-getting additional aps!

My advice is to back up the apt-cache which should contain the *.deb packages for all of the programs that you just installed.

Then build a script that restores apt-get and then
apt-get install xxxx

bring them back to life.

It is easier to keep track of ONE program package file than it is to keep track of all of the little files that get scattered over your system when you install a program.
Some programs are not made up of many files and it is possible to back the files up directly, but other programs can be a real mess to backup.  If you miss/forget to back up even 1 important file, then the program will not work again after the restore process.

Just my $0.02

OK - so where should I look for apt-cache?

So if you run apt-get to install a program you already have the *.deb of, it will see it and install from harddrive instead?
Are all of the required components kept in this cache, eg. libraries?

Sounds like the solution I'm after if this is the case.

I'm not in DSL at the moment so I am not sure, but try looking in:

/var/cache/apt/archives

or

/var/lib/apt/lists

for starters.

Good Luck.


original here.