keepcalculator

06 Numbers and Powers

CentOS Replacement Migration: Downtime, Backups & Rollback

Card No. 06·52258 · Updated · Standard formula, shown below

Total downtime (server-hours) 20.0 server-h
Downtime per server (hours)
2.0 h
Result
Downtime window (hours)
4 h
You entered
Server count
10 servers
You entered
You enter
Downtime window (hours), Server count, Parallel migrations
You get
Total downtime (server-hours), Downtime per server (hours)
Rounding
1 dp

This article answers the most common questions about migrating from CentOS to a replacement distribution, focusing on downtime, backups, rollback, and application support. You will learn how to plan a migration that minimizes service interruption, how to back up and restore your systems, and how to assess which replacement best supports your applications.

Formula

Total downtime (in server-hours) = (Number of servers × Downtime window per server) ÷ Number of parallel migrations.

Variables:

  • t – Downtime window per server (hours): the time each server is offline during its migration.
  • s – Server count: total number of servers to migrate.
  • p – Parallel migrations: how many servers you migrate at the same time.

The result gives you the total maintenance impact across all servers, and the per-server downtime shows how long each individual service is unavailable.

Worked Example

Using the defaults: 10 servers, 4 hours downtime each, and 2 parallel migrations.

Total downtime = (10 × 4) ÷ 2 = 40 ÷ 2 = 20 server-hours.

Per-server downtime = 4 ÷ 2 = 2 hours (because two servers are migrated simultaneously, each server still experiences 4 hours of downtime, but the total calendar time for the migration is 20 hours).

Why CentOS Replacement Matters

CentOS Linux reached end-of-life on December 31, 2024. That means no more security updates, bug fixes, or patches. Any system still running CentOS 7 is exposed to unpatched vulnerabilities. The two main replacement paths are:

  • CentOS Stream – a rolling-release distribution that tracks ahead of RHEL, but it is not a drop-in replacement for production stability.
  • RHEL-compatible clones – AlmaLinux, Rocky Linux, and Oracle Linux, which aim to be binary-compatible with RHEL.

Other options include migrating to Debian or Ubuntu, but that usually requires more application changes because package names and system tools differ.

Planning for Minimal Downtime

Downtime depends on your migration method. In-place conversion tools like almalinux-deploy or migrate2rocky can often complete in under an hour per server, but they require a reboot and a rollback plan. Blue-green deployment (building new servers alongside old ones) can reduce downtime to minutes, but it needs extra hardware and a load balancer.

Key steps to minimize downtime:

  1. Inventory everything – list all servers, applications, and dependencies.
  2. Test in a staging environment – replicate your production setup and run the migration there first.
  3. Schedule during off-peak hours – even with zero-downtime plans, unexpected issues are easier to handle at 2 AM.
  4. Use configuration management – tools like Ansible, Puppet, or Chef can automate reconfiguration on new servers.
  5. Consider containerization – if your apps run in containers, you can move them to a new host with almost zero downtime.

Backup Strategies That Actually Work

A backup is only useful if you can restore it. For a CentOS migration, you need:

  • Full system image – tools like dd or Clonezilla capture the entire disk. This is the safest for rollback, but it is slow and requires equal or larger storage.
  • File-level backups – rsync or tar can back up specific directories. This is faster but may miss boot loaders or partition tables.
  • Database dumps – for MySQL, PostgreSQL, or other databases, use their native dump tools (e.g., mysqldump, pg_dump).
  • Application configs – back up /etc and any custom config files. This is often the most critical part.

Test your backups by restoring to a spare server before you start the migration. A backup that has never been restored is a hope, not a plan.

Rollback: How to Undo a Migration

Rollback options depend on the method you chose:

  • In-place conversion – the original CentOS packages are replaced. To roll back, you need a full system backup taken immediately before the conversion. Restore that image.
  • Blue-green – you keep the old servers running until the new ones are fully verified. Rollback is simply switching the load balancer back to the old servers.
  • Snapshot-based – if you are using virtualization (KVM, VMware, etc.), take a snapshot before migration. Rollback is a one-click restore of the snapshot.

Always have a rollback plan written down before you start. Include the exact commands to restore and the expected time to complete.

Application Support on Replacement Distros

Most applications that run on CentOS 7 will run on AlmaLinux, Rocky, or Oracle Linux without modification, because they are binary-compatible with RHEL. However, check for:

  • Third-party repos – EPEL, Remi, and others have versions for these clones. Verify they support your new OS version.
  • Kernel modules – some proprietary drivers (e.g., for VPN clients or storage) may need recompilation.
  • Systemd services – if your app uses old SysV init scripts, they may need conversion to systemd units.
  • PHP/Python/Ruby versions – RHEL 9 ships with PHP 8.0, Python 3.9, and Ruby 3.0. If your app requires older versions, you may need Software Collections or containers.

If your application is certified for RHEL, it is generally certified for AlmaLinux and Rocky too, but always verify with the vendor.

Common Mistakes and Misconceptions

One common misconception is that CentOS Stream is a direct replacement for CentOS Linux. It is not – it is a rolling preview of RHEL, and its package versions change frequently. For production stability, choose a RHEL clone.

Another mistake is skipping the staging test. You might be tempted to migrate production directly, but a single incompatibility can cause hours of downtime. Always test on a non-production server first.

Also, many people forget to update their monitoring and backup scripts after migration. Hostnames, IPs, and package names may change, breaking automated tasks.

Frequently Asked Questions

How long does a CentOS migration take?

An in-place conversion typically takes 30–60 minutes per server, depending on the number of packages and disk speed. A blue-green migration can be done in minutes of actual downtime, but the preparation (building new servers, testing) can take days.

Can I migrate without any downtime?

Yes, if you use a blue-green deployment or containerization. You build the new environment alongside the old, switch traffic over, and then decommission the old servers. The switch itself is usually under a minute.

Will my CentOS 7 applications run on AlmaLinux 9?

Most will, but you need to check for removed packages and version changes. For example, PHP 5.4 (common on CentOS 7) is not available on RHEL 9; you would need to use a container or upgrade your app.

What is the best backup tool for migration?

For a full rollback, a disk image (using dd or Clonezilla) is the most reliable. For file-level backups, rsync is fast and flexible. Always back up your database separately with its native dump tool.

Is Oracle Linux a good replacement?

Yes, Oracle Linux is binary-compatible with RHEL and offers a free support option. It also includes the Unbreakable Enterprise Kernel (UEK), which some workloads find faster. However, it has a different support model and some users prefer the community-driven AlmaLinux or Rocky.

What happens if I do nothing?

Your CentOS 7 systems will continue to run, but they will not receive security updates. Over time, known vulnerabilities will be exploited, and your system will become increasingly insecure. Many compliance frameworks (PCI-DSS, HIPAA) require patched systems, so doing nothing is rarely an option.

Related

Formula used
in t | Downtime window (hours) | h | 4 | 0 | 168
in s | Server count | servers | 10 | 1 | 1000
in p | Parallel migrations | servers | 2 | 1 | 100
out total | Total downtime (server-hours) | server-h | s * t / p | 1
out per_server | Downtime per server (hours) | h | t / p | 1

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →