Need help migrating from CentOS to Ubuntu

With CentOS nearing its end of life, we’ve made the decision to migrate our servers to Ubuntu Server. However, we’re facing the challenge of needing to perform the migration remotely. Unfortunately, we haven’t found any documentation on migrating the entire system to Ubuntu (we understand a 1:1 migration isn’t possible) or on migrating the various services we utilize.

Our primary concern is migrating Suricata without losing the agent configurations and without the need for a complete reinstallation (which would be impractical). We’ve attempted to copy the necessary files, but so far, it hasn’t been successful.

We would greatly appreciate some assistance with this matter. Thank you.

To address the Suricata points, you will need to reinstall Suricata after the migration, so your only real option is to backup your existing configuration, but this could vary depending on how you installed Suricata. You’ll most likely want to backup:

  • /etc/suricata: This contains your Suricata configuration files (suricata.yaml) and maybe some other files like Suricata-Update configuration files enable.conf, modify.conf, etc. This may not be /etc/suricata on your system, but there will be an equivalent directory.
  • /var/lib/suricata: This contains Suricata-Update configuration files and the current state of your rules if managed by Suricata-Update
  • If you have any custom rule files, back those up.
  • If you use any tooling to ship your Suricata logs, back the configuration up for that as well

This should give you what you need to test Suricata in an Ubuntu VM or some other test system to make sure you have everything you need. Depending on the level of modifications, it might just be easier to re-apply your needed changes, especially if an upgrade of Suricata is order.

You might also want to consider AlmaLinux. They provide a tool to go from CentOS to AlmaLinux, plus do a major upgrade. I’ve used the tool twice without issues.

But however you choose, major upgrades like this should be expected to go bad, so have your backups and be ready for fresh installation.