Using RPM rollbacks in your updates

lek

Guest
#1
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
 

Bob

Joined
Nov 4, 2007
Messages
2,400
Likes
1
Points
36
#2
Edgar,

Thanks for that.

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

Regards

Bob
 

Bob

Joined
Nov 4, 2007
Messages
2,400
Likes
1
Points
36
#3
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
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,915
Messages
130,920
Members
17,594
Latest member
knethardsolutions
Top