Foreman replatforming guide

Problem: I have an existing running Foreman instance, but need to replatform it onto a new host.

Expected outcome: Guidance documentation available to assist with the process of migrating existing Foreman deployment to a new platform.

Foreman and Proxy versions: N/A(?)

Foreman and Proxy plugin versions: N/A(?)

Distribution and version: RHEL family

Other relevant data:
Looking for guidance and pointers from Foreman team (HNY, BTW) for performing a migration of Foreman server, proxy, etc. from existing RHEL family platform onto newly deployed RHEL machine. Need to retain DB, config, managed host info, DHCP, DNS, etc…

Is there some documentation that assists in this task, please?

In the case that a RHEL family to Debian (or vice-versa) migration of Foreman is required, is there guidance for performing such a task, please?


We don’t have much, this isn’t something we test unfortunately. We usually suggest a reinstall and re-registration of all hosts to a new instance, that is the safest method and you can even upgrade to newest version.

Backup procedure for Foreman is documented as a simple pgdump. For Katello we do have a script that backups DB and Pulp DB and content: Administering Foreman

That will not work for plain Foreman installation (without Katello), we need to improve docs here. Foreman and Katello are quite fragile deployments, I would suggest to give it a try but if you get stuck be ready to reinstall.

1 Like

Hi Lucas,

OK - I have a plain vanilla deployment without Katello.

I have regular pdumps in place, so if I understand you correctly, it should be possible to deploy a new Foreman onto a new platform using the same foreman-installer config file and then do an import from PSQL dump?

I’m not too keen on needing to re-register all the hosts if I can avoid it, although I can see that the Foreman CA would be ‘fresh’ on the new machine, so that’s probably unavoidable…

I’m wanting to try to preserve as much host history under foreman as I can, but particularly DHCP, DNS and host group assignments.



foreman-maintain backup should work equally good on a plain Foreman without Katello.

Try it :slight_smile:


Just don’t expect the tool to carry over full state - all configuration or state files including DHCP leases file, DNS domains etc. It backups bare-bones.

You should be able to copy files over to a new instance one by one but this will require a lot of knowledge and testing - Foreman has a ton of moving parts. It is doable, we might be able to help you if you run into issues. Start with DB and main configs backup, start up the deployment and then start testing all required workflows. As you run into issues, you will need to fix those.

I beg to differ. It’s a full backup.

1 Like

Oh nice.

Get back to us if you find something that the utility is missing then! Thanks.

when was the last time you looked at foreman/orchestration.rake at develop · theforeman/foreman · GitHub :slight_smile:

1 Like

Welcome back Ohad! :slight_smile:

That is indeed a useful script for DHCP, but for DNS we don’t have that unfortunately.