There is no easy way to rollback if you have upgraded Redhat Linux from say RHEL 6.1 to 6.5.
I have use below steps to roll-back OS to previous version.
1-Collect details of installed rpms before OS upgrade
mkdir /var/tmp/backup
rpm -qa --last > /var/tmp/rpm-qa-last-before.txt
2-Do following if you want to roll-back rpm to older version
rpm -qa --last > /tmp/rpm-qa-last-after.txt
sdiff -s /var/tmp/rpm-qa-last-before.txt /tmp/rpm-qa-last-after.txt | sed 's/ .* |//g'|awk '{print $1, $2}' >/var/tmp/backup/old-new-rpm-version.txt
echo "yum downgrade `echo $(awk '{print $1}' /var/tmp/backup/old-new-rpm-version.txt )`"
3-Copy and paste above output to some where for further reference. Execute below to downgrade rpm to older versions
yum downgrade `echo $(awk '{print $1}' /var/tmp/backup/old-new-rpm-version.txt )`
4-If above fails because of any dependencu error, exclude those package and deal with them later after above steps completed.
--exclude=package1*,package2*
5- Reboot system
6- Downgrade redhat-release-* rpm to older version if it has not been downgraded
grep redhat-release /var/tmp/rpm-qa-last-before.txt
rpm -qa |grep redhat-release
yum downgrade redhat-release-xxxx-n.m.-v
This is not perfect process, but works. Preserving OS image of creating some kind of snap/mirror/clone of filesystem is better approach - but this need additional time and resources.
Do you use any better method ?
I have use below steps to roll-back OS to previous version.
1-Collect details of installed rpms before OS upgrade
mkdir /var/tmp/backup
rpm -qa --last > /var/tmp/rpm-qa-last-before.txt
2-Do following if you want to roll-back rpm to older version
rpm -qa --last > /tmp/rpm-qa-last-after.txt
sdiff -s /var/tmp/rpm-qa-last-before.txt /tmp/rpm-qa-last-after.txt | sed 's/ .* |//g'|awk '{print $1, $2}' >/var/tmp/backup/old-new-rpm-version.txt
echo "yum downgrade `echo $(awk '{print $1}' /var/tmp/backup/old-new-rpm-version.txt )`"
3-Copy and paste above output to some where for further reference. Execute below to downgrade rpm to older versions
yum downgrade `echo $(awk '{print $1}' /var/tmp/backup/old-new-rpm-version.txt )`
4-If above fails because of any dependencu error, exclude those package and deal with them later after above steps completed.
--exclude=package1*,package2*
5- Reboot system
6- Downgrade redhat-release-* rpm to older version if it has not been downgraded
grep redhat-release /var/tmp/rpm-qa-last-before.txt
rpm -qa |grep redhat-release
yum downgrade redhat-release-xxxx-n.m.-v
This is not perfect process, but works. Preserving OS image of creating some kind of snap/mirror/clone of filesystem is better approach - but this need additional time and resources.
Do you use any better method ?
I installed RHEL 7.2 and other application,but now problem is my application support team, wants to downgrade RHEL 7.2 to 7.1, please help us.
ReplyDelete