[plug] apt-get and Debian testing
James Bromberger
james at rcpt.to
Sun Sep 23 17:23:54 WST 2001
On Sun, Sep 23, 2001 at 03:12:55PM +0800, Arkem wrote:
> 1. dpkg --get-selections to create a file with the previous package
> settings so in case of a disaster I can revert.
> 2. apt-get update with -q -y to get a new list of packages
> 3. apt-get dist-upgrade -q -y --show-upgraded to do the update
Sure, doing get-selections is a very good thing to have. Make sure you
put the output somewhere that your system backup is going to pick it up
from. For example, you could stuff this somewhere into /etc, and when you
backup /etc, it'll be taken care of for you.
You are doing backups, right? tar -cjf /etc /var/backups/`hostname`-etc.tbz.
Ie, make a bzip compressed tar of /etc. Put this onto removable media. Or
copy this to another host. Or both.
Doing and update is cool. I use the following:
#!/bin/sh
/usr/bin/apt-get update
/usr/bin/apt-get upgrade -d -y
/usr/bin/apt-get autoclean
I do not actually let it do the upgrade unattended; I think that is a
little risky, There are quite often configuration questions that need to be
asked interactively, and although DebConf is addressing this, it pays to
pay attention. Put the above four lines to /usr/local/bin/system-update.sh,
and add a cron entry for root for however regularly you like. You could add
a fifth line and combine the get -selections:
/usr/bin/dpkg --get-selections > /etc/debian-selections.txt
This will update the list, fetch but not install new packages, and clean out
the old versions of packages. You can then come along when you are deay, and
do an apt-get upgrade (or "install <package>") and everything should already
be nice and fast and ready for you.
> The output of this operation would be mailed to root, so I'd know
> what has happened. I'd probably run this maybe weekly or monthly. Is
> this a safe thing to do? Is there a better way to achieve this? Would
> a solution like this also be appropriate for a Debian unstable box?
Unstable: definitely not. I dont even do an upgrade on unstable. I get a
list of new packages, and then install them a few at a time, based on the
amount of risk the package poses should something go wrong. For example,
if there are a new set of mozilla binarie,s I thow them all in striaght away.
A set of new C libraries are done slowly, one at a time (unless dependencies
require a few together),
Hope that helps,
James
--
James Bromberger <james_AT_rcpt.to> www.james.rcpt.to
Remainder moved to http://www.james.rcpt.to/james/sig.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20010923/329324a6/attachment.pgp>
More information about the plug
mailing list