Fresh Install w/Partial Restore Question

I have a single Foreman server w/Katello on a CentOS Stream 8 box and will be migrating to el9 once Foreman 3.11 is released. I originally thought I’d do a backup/restore using foreman-maintain, but there are a couple disadvantages to this approach that have made me reconsider. Namely:

  1. The network interface of the new machine must have the same name as the old machine for the restore to work. This isn’t a huge deal (a udev rule renaming the old interface works fine), but is still a little annoying since el9 on xcp-ng uses new interface names.
  2. I’ve probably performed quite a few ill-advised configurations to my old Foreman instance, namely purging puppet data and installing that new reports functionality that was ultimately discarded. Restoring the DB in this states has me a little nervous.
  3. It’s going to take a lot of trial-and-error to figure out what needs to happen before foreman can even be restored correctly. Do I need to run the foreman-installer first and enable all the required features? Do the features installed need to match what foreman (and the contents of DB being restored) expect? There are too many variables for this one-man job.

So I’ve decided to install fresh! However, my current horrific plan is to take screenshots of EVERY configuration page and replicate those settings on the new foreman instance. My question is, is there a better way to do this WITHOUT taking screenshots or taking a full backup/restore? I’m only interested in backing up configuration settings such as “global parameters”, “content views”, “host-groups”, “realms”, etc. It would be nice if I could export these settings from the WebUI and re-import them. Anyway, just a shot in the dark in-case anyone has done something similar.

I thought about this a little more and the answer might be using the CLI and running hammer commands to both export and import a majority of the configuration. I’ll probably script this up in the weeks leading up to 3.11’s release and share here if it works out.