Moving ambari server involves basically following steps:
1). Stop the old ambari host and then install ambari server to new host.
2). Make the "/etc/ambari-agent/conf/ambari-agent.ini" file change on
all the agent hosts to point to new ambari server hostname.
Run the ambari-server setup command and then point to the Database
instance where your amabri DB is present in the "Advance Database
configuration Section". (If using postgres then choose option4
Postgres DB , not the Embedded Postgres DB).
OR if you want to
move the ambari DB as well to a new host then import the DB dump backup
to your new DB host and then during the ambari-server setup command
choose new host details.
4). Restart Ambari server and all the ambari agents.