RPM Package Rollback

One of the least known feature in RPM is that it has a rollback feature. This allows you to rollback any updates you have done to your installed packages. Quite useful if a recent update broke your system.

From http://www.oreillynet.com/onlamp/blog/2006/01/rpm_rollback_in_fedora_core_45.html

  1. To configure yum to save rollback information, add the line tsflags=repackage to /etc/yum.conf.

  2. To configure command-line rpm to do the same thing, add the line %_repackage_all_erasures 1 to /etc/rpm/macros.

  3. Install, erase, and update packages to your heart’s content, using pup, pirut, yumex, yum, rpm, and the yum automatic update service.

If/when you want to rollback to a previous state, perform an rpm update with the –rollback option followed by a date/time specification. Some examples: rpm -Uhv –rollback ‘9:00 am’, rpm -Uhv –rollback ‘4 hours ago’, rpm -Uhv –rollback ‘december 25′.

But remember that rollback takes up quiet a lot of space on /var . I won't do this Fedora as Fedora have quite frequent updates. But if you are running an important server on CentOS or RHEL, you might want to turn this feature on. It would be nice if somebody implements deltarpms support for rpm rollback. I believe it gonna save a lot of space.
Post a Comment

Popular posts from this blog

Adding simple popup to Plone frontpage

Tee'ing Python subprocess.Popen output

HOWTO: Mirroring Yum repositories using Yum-Utils