Re: is there a way to revert to a previous, known working set of debian packages?

2010-01-08 Thread C M Reinehr
On Fri 08 January 2010 05:23:44 am Jurriaan wrote:
> I'm comfortable using Debian/Unstable. I accept that things can go
> wrong, and I'm willing to file bugreports.
>
> However, I do wonder if there is any way to make snapshot of the current
> versions of all packages, then update, and then, if necessary, revert
> back to the previous snapshot.
>
> I seem to have upgraded to a non-working X last evening, where
> xserver-xorg-core depends on something that isn't release yet. I don't
> mind doing without X for a few days, but I did wonder if there is an
> easier way to say 'just get back to this known-working list of
> packages', instead of trying to install the correct versions manually,
> which gets rather tiresome when there's a lot of packages.
>
> The internet revealed 'apt-clone', which comes close, but seems to work
> only with ZFS and more like a general rollback tool, than just packages.
>
> How do other users do this?
>
> Thanks,
> Jurriaan
> --
> "Wefkins are unimaginative. Zocco, for instance, envisions a future of
> blissful ease, with never a pang of discomfort. Right or wrong?"
> "He is wrong indeed."
>   Jack Vance - Lyonesse III - Madouc

Hi Jurriaan,

I use a cron script & log the output of the following programs daily:

aptitude search '~i'
apt-show-versions
dpkg --get-selections

With these logs & apropriate backups I can restore my system to it's previous 
state, whether it's rolling back an upgrade or restoring from a crash. I 
would think that something similar would work for you.

Cheers!

cmr

-

-- 
Debian 'Etch' - Registered Linux User #241964

"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC


-- 
To UNSUBSCRIBE, email to debian-amd64-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: is there a way to revert to a previous, known working set of debian packages?

2010-01-08 Thread hendrik
On Fri, Jan 08, 2010 at 02:21:11PM +0100, Michael Dominok wrote:
> On Fri, 8 Jan 2010 11:23:44 +
> Jurriaan  wrote:
> > However, I do wonder if there is any way to make snapshot of the
> > current versions of all packages, then update, and then, if
> > necessary, revert back to the previous snapshot.
> 
> I do my upgrades using a little script.
> 
> #!/bin/sh
> 
> # /root/bin/getafix
> # Script to save packages to be upgraded in /root/lib/upgrade/$DATE 
> # using dpkg-repack
> # In case something goes wrong, whilst upgrading, a simple dpkg -i 
> /root/lib/upgrade/$DATE/*
> # will (hopefully) rebuild a working system.
> 
> #set -x
> 
> apt-get update
> 
> # d-ated dir-ectory
> DDIR="/root/lib/upgrades/"`date +%Y-%m-%d_%H:%M:%S`
> 
> echo $DDIR
> 
> # p-ackages t-o b-e u-pgraded
> PTBU=`apt-get -s upgrade | grep "The following packages will be upgraded:" 
> --after-context=1 | grep "^  "`
> 
> echo PTBU="->"$PTBU"<-"
> 
> if [[ -n $PTBU ]]; then  # PTBU non-zero
> mkdir $DDIR
> cd $DDIR
> dpkg-repack $PTBU
> else
> echo "No upgrades"
> fi
> 
> 
> So if anything goes wrong i only have to 
> 
> cd /root/lib/upgrades/`date +%Y-%m-%d_%H:%M:%S`
> 
> and 
> 
> dpkg -i *
> 
> 
> When dist-upgrading this will probably produce tons of packages in 
> /root/lib/upgrades/ 
> 
> Another way would be to simply copy the partitions involved (with dd) make 
> the upgrade and write them back i anything goes wrong. 

rdiff-backup might save you some disk space, but make sure you have at 
least a minimal spare Linux around to run rdiff-backup again to do the 
restore.  rdiff-backup is also capable of restoring older versions.  So 
you could even back up the broken system and still restore the older 
working version incase you wanted to have the broken one around too.

-- hendrik


-- 
To UNSUBSCRIBE, email to debian-amd64-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: is there a way to revert to a previous, known working set of debian packages?

2010-01-08 Thread Michael Dominok
On Fri, 8 Jan 2010 11:23:44 +
Jurriaan  wrote:
> However, I do wonder if there is any way to make snapshot of the
> current versions of all packages, then update, and then, if
> necessary, revert back to the previous snapshot.

I do my upgrades using a little script.

#!/bin/sh

# /root/bin/getafix
# Script to save packages to be upgraded in /root/lib/upgrade/$DATE 
# using dpkg-repack
# In case something goes wrong, whilst upgrading, a simple dpkg -i 
/root/lib/upgrade/$DATE/*
# will (hopefully) rebuild a working system.

#set -x

apt-get update

# d-ated dir-ectory
DDIR="/root/lib/upgrades/"`date +%Y-%m-%d_%H:%M:%S`

echo $DDIR

# p-ackages t-o b-e u-pgraded
PTBU=`apt-get -s upgrade | grep "The following packages will be upgraded:" 
--after-context=1 | grep "^  "`

echo PTBU="->"$PTBU"<-"

if [[ -n $PTBU ]]; then  # PTBU non-zero
mkdir $DDIR
cd $DDIR
dpkg-repack $PTBU
else
echo "No upgrades"
fi


So if anything goes wrong i only have to 

cd /root/lib/upgrades/`date +%Y-%m-%d_%H:%M:%S`

and 

dpkg -i *


When dist-upgrading this will probably produce tons of packages in 
/root/lib/upgrades/ 

Another way would be to simply copy the partitions involved (with dd) make the 
upgrade and write them back i anything goes wrong. 

Cheers

Michael


-- 
To UNSUBSCRIBE, email to debian-amd64-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



is there a way to revert to a previous, known working set of debian packages?

2010-01-08 Thread Jurriaan
I'm comfortable using Debian/Unstable. I accept that things can go
wrong, and I'm willing to file bugreports.

However, I do wonder if there is any way to make snapshot of the current
versions of all packages, then update, and then, if necessary, revert
back to the previous snapshot.

I seem to have upgraded to a non-working X last evening, where
xserver-xorg-core depends on something that isn't release yet. I don't
mind doing without X for a few days, but I did wonder if there is an
easier way to say 'just get back to this known-working list of
packages', instead of trying to install the correct versions manually,
which gets rather tiresome when there's a lot of packages.

The internet revealed 'apt-clone', which comes close, but seems to work
only with ZFS and more like a general rollback tool, than just packages.

How do other users do this?

Thanks,
Jurriaan
-- 
"Wefkins are unimaginative. Zocco, for instance, envisions a future of
blissful ease, with never a pang of discomfort. Right or wrong?"
"He is wrong indeed."
Jack Vance - Lyonesse III - Madouc


-- 
To UNSUBSCRIBE, email to debian-amd64-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org