Using RPM rollbacks in your updates

Discussion in 'General' started by lek, Nov 18, 2007.

  1. lek

    lek Guest

    RPM and Yum support the rollback feature. This is very usefull if you would want to rollback a update process if this process goes wrong for some reason.

    To do it you just need to add a --repackage option in any "rpm -e" command and also edit the /etc/yum.conf and add this line:

    Code:
    tsflags=repackage
    So, if something goes wrong you can rollback to your previous rpm versions just typing this command:

    Code:
    rpm -Uvh --rollback '2 hours ago'
    You can adjust the time to the right time for you. For more information see this usefull article:

    http://www.linuxjournal.com/article/7034

    Finally, let's see how would looks a update from Elastix 0.8.5 to 0.9 using RPM rollbacks:

    #rpm -e --nodeps --repackage freePBX
    #rpm -e --nodeps --repackage spandsp
    #yum update

    Of course, don't forget to edit the /etc/yum.conf file or the whole process will not produce the desired results.

    Post edited by: edgar, at: 2007/11/18 00:58<br><br>Post edited by: edgar, at: 2007/11/18 00:59
     
  2. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Edgar,

    Thanks for that.

    You learn something new every day, I wasn't aware of that capability in Yum.

    Regards

    Bob
     
  3. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    For anyone that is interested, this guy's blog explains how to set YUM and RPM to perform repackage automatically, saving you the worry of specifying the -e command on individual RPM updates.

    http://blog.chris.tylers.info/index.php ... edora.html

    Also just in case it is not clear to others, unless you have them set before you perform your YUM/RPM updates, you cannot rollback. It is not on by default.

    Regards

    Bob
     

Share This Page