*** derek has joined #gnuenterprise *** reinhard has joined #gnuenterprise good morning *** kilo has joined #gnuenterprise *** btami has joined #gnuenterprise *** jcater has joined #gnuenterprise *** btami has quit IRC *** kilo has quit IRC question to all debian studs a server crashed, but I have a backup of /var how can I do an apt-get install of all the packages that were installed on the server before? reinhard... this is quick and dirty so read over the code but.... ---- read.py ---- f = open("/var/lib/dpkg/status") package = None for line in f: if not line.strip(): package = None continue if line.startswith('Package:'): package = line.split()[1] if line.startswith('Status: install ok installed'): print "%s\t\t\tinstall" % (package, ) ------- that should give you a list that you can feed into dpkg --set-selections followed by apt-get -u dselect-upgrade ah hmm you know where dpkg --get-selections takes the info from? would something like pipe the output of the .py file to a temp file then < that file 1. back up /var/lib/apt err /var/lib/dpkg 2. copy /var/lib/dpkg from old backup dpkg --get-selections restore previous /var/lib/dpkg dpkg --set-selections work? I don't see how it would hurt anything but honesty, you've exceeded my knowledge level of dpkg :) ok :) thanks anyway I'll try and find out :) your hint was good in any case bbl *** reinhard has quit IRC *** Morphous_ has joined #gnuenterprise *** Morphous has quit IRC *** jamest has joined #gnuenterprise *** reinhard has joined #gnuenterprise *** derek has quit IRC *** reinhard has quit IRC *** jamest has quit IRC *** jcater has quit IRC *** ncjp has quit IRC *** ncjp has joined #gnuenterprise *** jamest has joined #gnuenterprise *** jamest_ has joined #gnuenterprise *** chillywilly has quit IRC *** jcater has joined #gnuenterprise *** jcater has quit IRC *** jamest has quit IRC *** ncjp has quit IRC *** ncjp has joined #gnuenterprise