Ispmanager 6 lite, pro, host documentation

How to migrate from CentOS 7 to AlmaLinux 8

This script is designed to simplify the process of converting the CentOS 7 operating system to AlmaLinux 8 within a server. The script prepares the operating system for the conversion and performs the conversion itself using the Elevate tool.

Getting ready to migrate

It is strongly recommended to take system snapshots and database backups before starting the conversion. This is necessary because the consequences of conversion can be unpredictable, up to and including complete server inoperability. Make sure that you have a way to recover the server before starting the conversion.

Limitations

After performing some tests, the following constraints were identified that could block the conversion process:

  • CentOS version under 7.9;
  • Using a kernel that is not the latest available version. Elevate will not allow conversion in this case. It is recommended to yum update and restart the server before conversion;
  • using PHP from the remi/rhel/scl repositories. Such configurations may not work after conversion. It is recommended to use the panel import;
  • using MySQL version lower than 8.0.36 or MariaDB version lower than 5.5.68. Elevate cannot successfully convert databases of such versions, which can cause many problems;
  • Lack of RAM (less than 4 GB) or disk space in the /var/lib/ directory (less than 5 GB). The conversion uses a lot of resources and may fail with an error if resources are insufficient.;
  • xfc ftype=0. Conversion in such a configuration will not be completed;
  • encrypted file system partitions. The conversion will not be completed in this case;
  • ispmanager version is lower than 6.95.0. You can check this with the following command /usr/local/mgr5/bin/core ispmgr -v;
Pay attention!
It is not recommended to run the conversion process while the panel is updating.

Recommendations 

  • Centos version 7.9;
  • ispmanager version 6.95.0 or higher;
  • the following packages are installed: grub and python3;
  • at least 4 gigabytes of RAM;
  • at least 5 gigabytes of disk memory;
  • use the screen utility in case the ssh connection is broken;

How to use

The conversion process consists of the following steps: preparation, OS conversion, reboot, and panel recovery. The script is executed twice: before the restart for preparation and after the restart to restore the panel operation.

How to run the script

The script is executed using Python 3. To run it, execute the command in the directory where the script is located.

screen
curl -o centos7-to-alma8.tgz "http://download.ispmanager.com/tools/centos7-to-alma8.tgz"
tar -xzvf centos7-to-alma8.tgz
cd centos7-to-alma8
python3 main.py

 

A warning message will be displayed after startup. To confirm the start of the OS preparation and conversion process, enter yes.

The script will check the server for compliance with the criteria described above. If all criteria are met, the preparation and conversion will begin. The server should then be restarted and the script run again. Make sure to connect up-to-date operating system repositories and disable/remove irrelevant repositories to avoid errors when installing packages after a reboot.

You can avoid restarting the server manually by specifying the --reboot flag. In this case, the script will restart the server itself and start immediately after the server comes up. Example command:

python3 main.py --reboot

Additional info

After successful conversion and restoring the panel, it is recommended to restart the server.

Check the yum exception list before converting, as their presence may affect the success of the conversion..

The migration script writes logs in the script directory — convertation.log. The logs contain information about the current process and possible errors. Elevate also writes logs to /var/log/leapp/preupgrade.log and /var/log/leapp/upgrade.log.

After successful conversion, a file conversion-report.txt is created in the script directory, which contains the configuration files that were modified during the environment preparation. The original versions of the configuration files are saved in /var/config_backups/.

A script may terminate with an error for many reasons. After correcting the errors, the script can be restarted — it will continue execution from where it left off.

There may still be packages from CentOS 7 repositories on the server. You can check for them with the command:

rpm -qa | grep el7

Known issues

  • When using OpenLiteSpeed and PostgreSQL, PostgreSQL does not start after conversion. There is no solution yet;
  • If Afterlogic is used, it is replaced by RoundCube after conversion, but Afterlogic itself continues to work.