Migrating the current foreman environment to new environment

We have a Production working Foreman environment, which is foreman 3.8.
I want to replicate the same setup in out Foreman DEV environment.
I have downloaded the setup from PROD environment using hammer list CLI tool to csv files.
These are component that I extracted:
activation-key
ansible-roles
architecture
auth-login-basic.csv
compute_resource
config-report.csv
content-view
domain
environment
fact
global_parameter
hostgroup-ansible-roles-list
hostgroup
location
medium
model
organization
os
partition_table
product
proxy
puppet_class
report
repository
shell
subnet
template
user
And hostgroup ansible-roles

What is the way to upload these into DEV environment?
The hammer create command doesn’t do the job directly.

I don’t think there is a good way to do this automatically, no.

If you’d be setting up a fresh set of environments, I’d recommend using our Ansible collection (GitHub - theforeman/foreman-ansible-modules: Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello) and use that to configure all environments in a similar manner. But extracting data from an existing setup is also something that’s not easily possible with that.

1 Like

Thanks for the response,
I finally end up doing manually adding them using hammer create command based on what extracted using hammer list command