[Question] Backup / Restore instead of upgrades

Problem:

I have been hit with upgrade issues outlined in a few separate places like here Foreman 3.11 upgrade

I am treating this as a breaking issue and now consider myself stuck on 3.10 because I do not have the time to figure this out and maintainers seem to still be working it out themselves (thank you!). I see myself as having two options – (1) Inject an old version in to a new version to upgrade (2) Rebuild entirely and piece by piece migrate my foreman+katello clients over.

(1) I would like to know if Foreman has the support to inject a backup and upgrade in place – i.e I would like to backup my 3.10 installation, install a working 3.11+, and then restore my 3.10 in to my 3.11 and upgrade in place.

I had done it this way with ovirt and I am starting to see some parallels in how the foreman runs so if this option is available I’d like to know. If there are development cycles started on this and I can submit PR’s to help please let me know.

Expected outcome:

Realistically, an issue like the above one linked to not have happen. I am not sure how a change like that passes baseline regression testing before being pushed out. So my expected outcome is to have another method available to work through an upgrade.

Foreman and Proxy versions:

3.10

Foreman and Proxy plugin versions:

3.10

Distribution and version:

RHEL8

Other relevant data:

The problem you may run into is that very often there are database schema changes made as part of the version upgrades so the data structures may not be compatible between versions.

The only reliable way I would attempt this is to have the same version on both, do the backup/restore, and then upgrade after.

1 Like

Understood but that is part of why I am talking about it here – wondering what other people may be thinking because tbh as soon as I saw that there was a postgres version change I knew immediately there were going to be problems. Irrespective of the upgrade issue being there or not, database changes should be handled more gracefully. From the issue I hit, it looked like the postgres version upgrade offlined the database where foreman-installer needs the database online as does the rake. This seems straightforward to me that the database version upgrade should have been handled separately and I struggle to understand how it made it through a single regression test before being pushed out.

liquibase is a very capable CICD system for databases and IIRC foreman uses liquibase under the hood for said schema changes. I can imagine a way for liquibase to help out there.

I have seen some platforms allow you to install a fresh version of their software, shut it down, drop the database, insert the database, and then on the next run it will automatically in place upgrade the schema when it starts.

I could be wrong but I feel like one of those was ovirt-engine