Thanks for reaching out to the Cloudera community.
After setting up the Cluster infra and installing CDH & CM, you can use Cloudera Manager API[1] to Backing Up and Restoring the Cloudera Manager Configuration of an existing Cluster to a New Cluster.