[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a cautionary tale w/ successful recovery



On Tuesday 03 November 2009 10:38:41 Johannes Wiedersich wrote:
> Andrew Sackville-West wrote:
> > On Sun, Nov 01, 2009 at 07:08:00PM -0500, Andrew Reid wrote:
> >>   For the sysems I back up at work, we do the dpkg --get-selections
> >> thing, but I've never kept a copy of the boot sector -- that's an
> >> excellent idea.
>
> I guess the 'state of the art' way of recording a list of installed
> packages, nowadays is
>
> # aptitude -F "%p" search '~i!~M' > package-list
>
> You can then just install like
>
> # aptitude install $(cat pacage-list)
>
> dpkg --get-selections does not distinguish between packages installed
> manually or automatically, so that information is lost on the reinstall.
>  The search pattern just looks for packages that were installed
> manually. The install will automatically install all dependencies.

However, because of OR dependencies (i.e. using the '|' character), it might 
install *different* packages to satisfy dependencies.  Your saved 
configuration files won't work with those packages.

Some combination of dpkg --get-selections and aptitude search '~M' should be 
able to save both "all installed packages" and "all automatically installed 
packages", and some combination of dpkg --set-selections, aptitude markauto, 
and aptitude install should be able to restore them.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: