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

Re: Proposed feature...

Marco Gaiarin wrote:
> Hi, i'm not subscribed to this list, so i hope someone will approve
> this post... ;)))
> I'm thinking about a feature to add to debian package management
> system, feature that i consider usefoul.
> I manage my debian box, a fidonet BBS running also debian, and in the
> near future a full-internet box (called Pasolini).
> In BBS and Pasolini i've no critical data, no user files that have to
> be backed up: only some ftp (nodelist and misc file), some web
> (mirrored in at least 2 other place), some spool file that can be lost
> with no pain.
> So in this machines i do backup simply periodically tarring /etc,
> /var/named, /var/spool/cron, /usr/local.
> If a disk fault occured, i reinstall the distribution, tar back config
> file and run.
> But...
> But, how can i trace exactly the package installed?!
> People in debian-italian say me to backup /var/lib/dpkg/status, right
> answer.
> But can i reinstall the exactly number and version of package from
> status file?! debian-italian guys say me that i can build a perl-script
> that extract package name from status and install it.
> Ok, but this is not the best answer, because i don't know perl ;),
> and because i think this is a usefoul feature, not so hard to implement.
> Pratically such feature will get a status file, will search for package
> in source media and reinstall it.
> Usefoul goodies will be a warning print if package version mismatch (i
> recompile often package, at least if* and procmail), jump configuration
> steps (save time, and i've a tar of /etc in some safe place).
> With this feature one can install a base debian system, feed the
> old status file to dpkg/apt, reinstall package, untar the old
> configuration file over the fresh-installed system, restore the web
> contents. Et voila`.

I believe what you want can be done with:

dpkg --get-selections > file_to_backup.txt

Although this will not remember the version of the package, that is ok
because older versions of your packages will not necessarily be
on the ftp site anyway.  If you are installing from CD, then it should
re-install the same versions.

To rebuild, use:

dpkg --set-selections < file_to_backup.txt

And all your old packages will be selected for install in dselect.

Hope this helps,

Reply to: