3

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?

2
  • Which Linux distribution are you using? Commented Sep 1, 2014 at 7:09
  • I am using centos-5 64bit. Commented Sep 1, 2014 at 7:15

1 Answer 1

5

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 ;)

1
  • seems useful, I am going to trying it. Commented Sep 1, 2014 at 8:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.