Difference between revisions of "Rollback"

From Atomicorp Wiki
Jump to: navigation, search
(New page: Add to /etc/yum.conf tsflags=repackage*)
 
Line 1: Line 1:
Add to /etc/yum.conf
+
= Configuring the System to save rollback information =
  
  tsflags=repackage*
+
1. Configure yum to save rollback information.
 +
 
 +
Add the line
 +
 
 +
tsflags=repackage*
 +
 
 +
to /etc/yum.conf.
 +
 
 +
2. Configure command-line rpm to save rollback information:
 +
 
 +
Add the line:
 +
 
 +
%_repackage_all_erasures 1
 +
 
 +
to /etc/rpm/macros.
 +
 
 +
= Using rollbacks =
 +
 
 +
Back out an updates, which you can do with either rollback, or oldpackages
 +
 
 +
Method 1:
 +
 
 +
To rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specifier.
 +
 
 +
Examples:
 +
 
 +
rpm -Uhv --rollback '9:00 am'
 +
rpm -Uhv --rollback '4 hours ago'
 +
rpm -Uhv --rollback 'december 25'.
 +
 
 +
Method 2:
 +
 
 +
Use the "oldpackage" option to manually force a specific RPM:
 +
 
 +
rpm -Uvh --oldpackage foo-1-1.i386.rpm
 +
 
 +
Keep in mind this will only let you rollback what can be rolled back. Some OS updates are not reversible, for example, if you did an upgrade of mysql that changed your tables you would not be able to roll back this way.

Revision as of 12:55, 11 March 2011

Configuring the System to save rollback information

1. Configure yum to save rollback information.

Add the line

tsflags=repackage*

to /etc/yum.conf.

2. Configure command-line rpm to save rollback information:

Add the line:

%_repackage_all_erasures 1

to /etc/rpm/macros.

Using rollbacks

Back out an updates, which you can do with either rollback, or oldpackages

Method 1:

To rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specifier.

Examples:

rpm -Uhv --rollback '9:00 am' rpm -Uhv --rollback '4 hours ago' rpm -Uhv --rollback 'december 25'.

Method 2:

Use the "oldpackage" option to manually force a specific RPM:

rpm -Uvh --oldpackage foo-1-1.i386.rpm

Keep in mind this will only let you rollback what can be rolled back. Some OS updates are not reversible, for example, if you did an upgrade of mysql that changed your tables you would not be able to roll back this way.

Personal tools