[CentOS] 'yum update' rollback or .. ?

Fri Jun 22 11:06:10 UTC 2012
Theo Band <theo.band at greenpeak.com>

On 06/22/2012 09:42 AM, przemolicc at poczta.fm wrote:
> Hello,
> we have several physical servers (CentOS 5.*) with rather critical applications where (because of stability)
> we don't do regularly 'yum update'. In virtualized environemnts (under Vmware)
> we do a snapshot, then 'yum update', reboot and if something is wrong we rollback the snapshot.
> On physical servers we cannot do that. I have read about rollback option of rpm but not sure if
> this is reliable solution. What is your best practise regarding "rollbacking" 'yum update' on
> physical servers ?
One solution would be to use lvm snapshots. Create a snapshot of the
root volume (lvcreate -s VolGroup00/LogVol00 -n rootsnapshot -L 10G), do
an update and see if it works. If not, boot into rescue mode and copy
the content from the snapshot back to the original.
Make sure the snapshot gets the same size as the original volume. This
is important if you want to copy back all the data.