Database Migrate 1.9.3 to 1.20

I am examining options for doing an upgrade from Foreman 1.9.3 to Foreman 1.20. The documentation describes the rake db:migrate - my question is this: it is reasonable to assume that this will work across such a large version gap? If not, are there things that can be done to get around that?

Also, if there are any other thoughts that might be helpful to know for such an upgrade, I would be most appreciative.

Thanks!

IIRC you must hit every “major” version as the rake tasks assume N-1 to N upgrade(s).

Your looking at a long upgrade path - but definitely possible…

I had to do 3 upgrades back to back once - it “sucked” but definitely worked that way.

Alternatively you could look at starting over/fresh on 1.20 with a side by side migration

As @Lang_Jason mentioned, we generally test and ensure upgrades work only one version at a time. Jumping such a long time may hit unexpected results and will most likely fail at some point. You can do multiple upgrades in a row, as long as you do them one at a time, but it might be good to verify everything is working correctly at least once in every few versions (and make sure to make backups in case something goes wrong). Also, if you are using any plugins, you will need to verify that they are compatible with 1.20 and upgrade them in sync with the foreman core - since different versions of plugins are compatible with different core versions. If you are on an older disro (e.g. EL6, ubuntu precise etc) you may need to upgrade the distro as well in the process to be able to upgrade past certain versions.

The alternative is indeed standing up a new server and migrating data and hosts to it gradually.

The choice of which one is simpler for you depends on the size and complexity of the managed estate - if it is on the smaller side, “starting over” would likely be simpler, if it’s larger, upgrading will likely be the better route.
In any case, I’m sure you’ll be excited with all the new changes in 1.20 - the upgrade represents about 3 years of development, so there’s lot’s of great features and improvements!

1 Like

Please report back to us how it went, make notes or do a blogpost. These upgrades are not that rare and people are constantly asking for experience on this site.

Thanks for the tips and info. I’ll keep you guys posted!