In our earlier guide, we walked you through the installation of AlmaLinux 8.4. If you have CentOS 8 installed, an automated migration script is available to help you migrate seamlessly to the latest version of AlmaLinux 8.4 without uninstalling and performing a fresh installation.
In this guide, we will walk you through the migration of CentOS 8 to AlmaLinux 8.4 using an automated migration script that is available on Github.
A Word of Caution
Even though the migration in our case was smooth and successful, we highly encourage you to perform a backup of all your files in case something goes wrong. As the adage goes, better safe than sorry, and ideally you want to be on the safe side in case of any eventuality.
Prerequisites
Before getting started, ensure that you are running at least CentOS 8.3. If you are running any lower version, you will encounter an error when running the migration script.
Here’s a perfect example of what we initially encountered when trying to migrate using CentOS 8.0.
Moreover, be sure you have at least 5GB of free disk space on your hard drive to handle the upgrade process since it involves downloading & reinstalling files from the internet.
Finally, a fast and stable internet connection will certainly help in accelerating the migration to AlmaLinux.
Without much further ado, let’s roll our sleeves and get started with the migration.
Step 1: Download AlmaLinux Migration Script
To start off, launch your terminal and download the almalinux-deploy.sh script from the AlmaLinux Github page using the curl command as follows.
$ curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Once downloaded, assign execute permissions to the migration script using the chmod command as follows.
$ chmod +x almalinux-deploy.sh
Step 2: Migrate from CentOS 8 to AlmaLinux 8.4
Now run the almalinux-deploy.sh script as follows to start the migration to AlmaLinux.
$ sudo bash almalinux-deploy.sh
The script performs a couple of tasks. First, it runs a few system checks. It then goes ahead to uninstall, reinstall, and upgrade some packages to synchronize them with the latest release of AlmaLinux, which at this time is AlmaLinux 8.4.
This process takes quite a while – roughly 2 hours in our case – and it’s an ideal moment to do some grocery shopping or indulge in some video games.
When the migration is complete, you will get the notification that the migration was successful as indicated below.
Finally, reboot the system to load the latest AlmaLinux OS.
$ sudo reboot
For a moment, you will see a black screen with the AlmaLinux logo at the bottom as shown.
Then shortly after, the grub menu will appear with the AlmaLinux entry highlighted at the very top. Press ENTER and wait for the system to initialize.
Provide your password and click on ‘Sign In’ to log in to AlmaLinux.
This ushers you to the beautiful desktop background of AlmaLinux 8.4.
On command-line, you can verify the version of your system by running:
$ lsb-release -a $ cat /etc/redhat-release
Conclusion
In this tutorial, we have taken you through the process of migrating from CentOS 8 to the latest version of AlmaLinux using an automated script. The script pulls new packages online, downgrades, upgrades, and reinstalls some packages to sync with the latest version of AlmaLinux. As you can see, it’s quite a simple process since the bulk of the work is managed by the installation script. Your feedback is very much welcome.