Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 at 7:09
    
I am using centos-5 64bit. –  K.K Patel Sep 1 at 7:15

1 Answer 1

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:

tsflags=repackage

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 at 8:22

Your Answer

 
discard

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.