Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Puppet server version 2.6.4 that was manually installed using RPM packages directly (instead of using Yum to fetch packages from a repository).

Now I want to upgrade it to the latest version (3.6), as safely as possible, by installing it using the Puppet Labs repository and Yum.

In case something goes wrong, how can I rollback the change? What should I do to backup the current setup before upgrading?

share|improve this question
Which Linux distribution are you using? – Sgaduuw Sep 1 '14 at 7:09
I am using centos-5 64bit. – K.K Patel Sep 1 '14 at 7:15

CentOS 5 has a nifty way to rollback your system. On update, it can rebuild packages with the configs that are present at that time.

Configure RPM to repackage packages that will be altered by adding the following line to /etc/rpm/macros:

 %_repackage_all_erasures 1

Create the file if not present.

Next, configure yum to handle this transaction-scenario, by adding the following line to /etc/yum.conf:


When you decide you need to do a rollback, you can do so by using rpm --rollback. Examples:

rpm -Uhv --rollback '19:00'
rpm -Uhv --rollback '8 hours ago'
rpm -Uhv --rollback 'december 31'
rpm -Uhv --rollback 'yesterday'

Info originally taken from here.

Of course it will not hurt you, if you make a backup of your configurations, just in case ;)

share|improve this answer
seems useful, I am going to trying it. – K.K Patel Sep 1 '14 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.