What is it needed to "migrate" everything needed to a new foreman machine?


We are quite new to Foreman.
We have an old one that is too much work to get fixed so we decide to make a new one.

What do we need to export from the old one to the new one in order to make everything work perfectly? The hosts, repositories?

One thing that I have to tell you to take in a count, we cannot export and import the database from the old one to the new one, since the old one is mongodb and the new one postgresql.

If information is missing, please ask, we need help

If you have a large amount of systems, I would create a a bash script that calls hammer for each host you need to create. I have done this but it was not a good solution though.