Debian upgrade rollback

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Dec 8 16:56:36 UTC 2009


On Tue, Dec 08, 2009 at 11:37:24AM -0500, Darryl Moore wrote:
> Hi TLUGers,
> 
> I know a few of you are fairly familiar with rsnapshot. I've received
> some good answers from you before.
> 
> I am wanting to use rsnapshot to manage package upgrades under Ubuntu.
> With Debian packages there is no easy way to roll back an upgrade if it
> somehow breaks the system.
> 
> If I can use rsnapshot to backup all the system files and the apt
> database, then if an upgrade goes bad I should be able to easily restore
> the system and fix it.
> 
> Has anybody done this before?

No, but I have heard of someone doing something for the same purpose
but in a much better way.

At the linux symposium someone showed a system using a ramdisk unionfs
to test upgrades before doing them for real.

> I have configured rsnapshot.conf with the following backup directories:
>
> 
> #####################
> #
> #  System backups
> #
> backup  /boot   localhost/
> backup  /usr    localhost/
> backup  /etc    localhost/
> backup  /lib    localhost/
> backup  /bin    localhost/
> backup  /sbin   localhost/
> backup  /opt    localhost/
> backup  /var/lib/apt    localhost/
> backup  /var/lib/aptitude       localhost/
> 
> Does anyone see anything wrong with this setup?
> 
> There is very little information on restoring from a backup. Ideally, I
> would run the backup immediately prior to the upgrade. If I need to
> rewind it, I would like to simply copy back the files that were
> changed,and remove any additional files that were added. Is there an
> easy way to do this or do I need to write my own script to compare the
> original files with the backups? rsnapshot-diff is great for comparing
> between different backups, but I have seen nothing that checks any of
> the backups against the originals.

You would have to restore everything to be sure you had rolled back
everything.  Sounds very likely to go wrong.

Some people do it by breaking a raid1 before doing an upgrade.  If the
upgrade is bad, they switch to the other disk and resync the raid from
that.  If it works fine, they simply add the other disk back into the
raid and resync.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list