With CentOS 7 fast approaching End of Life in June 2024, this article explains how easy it is to upgrade from CentOS 7 to AlmaLinux 8 using the ELevate tool.
What is Elevate?
ELevate is an open-source migration tool developed by the AlmaLinux team to enable you to easily migrate between major versions of RHEL-based distributions from 7.X to 8.X.
It currently supports migration from CentOS 7 to the following operating systems:
- AlmaLinux 8
- Rocky Linux 8
- CentOS Stream 8
- Oracle Linux 8
We will focus on AlmaLinux 8 in this guide. The same process will work for each OS listed above.
All applications, settings, data, and configurations will be retained when upgrading using ELevate.
- Make a snapshot backup of your machine, all data, and settings to a separate environment that can be easily restored
- Plan your maintenance window. ELvate is not able to support live upgrades/migrations
- Test the process flow with a sandbox / test environment before proceeding to carry the upgrade in production
We have upgraded several cPanel servers with ELevate and production servers with this method.
Note: If you have a Virtual Server with 5wire Networks, you will be able to create a Backup Snapshot in our billing portal.
Update CentOS 7
Make sure that you are using the latest version of CentOS 7. The best way to do this is by –
sudo yum update
sudo yum upgrade
You must reboot your server to apply the changes –
Next, check the CentOS 7 version that is being used –
At the time of writing this article, you should see CentOS 7.9 which is the latest branch. Check the CentOS website to see the latest version.
Step 1: Install Elevate
Install the elevate-release package. Run the following command –
sudo yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
Step 2: Data Migration
The elevate-release package includes the Leapp utility to migrate Enterprise Linux 7 to Enterprise Linux 8.
You will need to install the following package –
sudo yum install -y leapp-upgrade leapp-data-almalinux
If you wish to install CentOS Stream, Oracle Linux or Rocky Linxu change the parameter to one of the below –
Step 3: Pre-flight check
Run the following command to check if the upgrade is possible:
sudo leapp preupgrade
This will run a series of actions to check whether it is possible to perform the upgrade. The Leapp utility will generate a log file that contains potential issues.
You must run the preupgrade check once you have addressed any issues stated in the log file to ensure the upgrade is successful.
Use your preferred reader to check the preupgrade log file –
Once you have resolved all of the problems, re-run the preupgrade utility as a final sanity check –
sudo leapp preupgrade
If there are no further outstanding issues, you are ready to proceed to Step 4.
Step 4: Upgrade
Warning: Before running the following steps, you must have a backup of your machine in a separate environment, easily available to restore in case of upgrade failure.
sudo leapp upgrade
Once the upgrade is complete, reboot your system:
During the upgrade process, ELevate-Upgrade-Initramfs will appear in the GRUB menu. Once you issue the reboot command, the system will automatically boot into it. The console will display the progress of the upgrade.
Step 5: Completed Upgrade
The system will automatically restart once the upgrade has been completed. You will be able to verify that the current operating system has been upgraded –
VERSION="8.8 (Sapphire Caracal)"
ID_LIKE="rhel centos fedora"
PRETTY_NAME="AlmaLinux 8.8 (Sapphire Caracal)"
Looking good! This means you have successfully upgraded CentOS 7 to AlmaLinux 8.X.