Is it possible to migrate all data to a fresh installation (based on newer version) of Foreman/Katello?

Hello,

My current production system is based upon Foreman 3.10 / Katello 4.12 and Rocky Linux 8

I wanted to plan software upgrade, threw a quick look and was caught off-guard seeing the latest supported versions of Foreman/Katello only running on EL 9.

I have a lot of data / specific versions / subscriptions that I need to keep “locked” in their current state in staging and production, so starting off fresh with a new platform is not currently an option unless it is possible to export / import all data that i have on the current system.

I don’t suppose it is possible to freshly install latest and greatest Foreman / Katello combo on Rocky 9 but then use full backup from my old version and get back on the track that way? Or is it?

Thanks in advance for any feedback.

1 Like

I would recommend the in-place update with Leapp.

Migration with old data will cause problems as database migrations could be missing, so if forced to migrate I typically still update to the version we want to migrate or migrate and the update.

1 Like

I also recommend you upgrade your instance from EL8 to EL9 using Leapp. But I want to expand a bit:

First, you are on 3.10/4.12, which is EL8 only. The first thing you should do, is upgrade to 3.12/4.14, which is the final version that supports BOTH EL8 and EL9.

Once there, you can use Leapp to upgrade from EL8 to EL9 as @Dirk suggested.

If you were determined to migrate to a new instance instead, you could also install a second 3.12/4.14 instance on a EL9 host at this point. You now have two instances using the same version of Foreman/Katello, one on an EL8 and one on an EL9 host. Here you could export all your data and import it on the new instance, and once the new instance has all your data, continue to upgrade it as normal. But I would not recommend this. It is much easier to use Leapp to upgrade in place, and you are far less likely to run into problems than you are with moving your data between instances.

2 Likes

The alternative to using leapp is foreman-maintain backup/restore. You would create another server with the same Foreman version as the old one but on EL 9 and then restore from your backup.

As a side note, I’ve heard a number of users mentioned now that their Foreman setup lives as Ansible code so they just destroy and recreate the environment when it comes time to upgrade the OS.

1 Like

Hi there!

It might be a good idea to take this moment to check both boxes, automate and upgrade

From what I read in your post, ditching the current instance and starting over isn’t viable (as of now), however that doesn’t mean that trying to automate your ‘base’ config isn’t a worthwhile goal.

I wrote a role a while back that makes KaFo/Satellite disposable (GitHub - Thulium-Drake/ansible-role-foreman: Ansible toolkit for Foreman/Satellite) which is the best disaster recovery you can imagine (your backup is only a few Kb in size :wink: ). We’re confident enough in the rebuild strategy that we don’t even make backups.

And I recently also tested the Leapp upgrade on a Satellite system, works like a charm, the folks around here have made it almost effortless <3

Last thing to think about, you mentioned that you have some config state that you must keep as is. How would you recover that in a disaster scenario?

In our setups we don’t really make room for specials on the server side. We provide all repos that are needed, but if a certain system needs to pin a specific package, that’s up to the system admin. I found it easier to manage all the specials in Ansible rather than in the KaFo/Satellite side.

Hope this helps :blush:

2 Likes