Created 01-06-2017 11:55 AM
We are running our ambari database with mysql on a dedicated host. Now we need to move the DB to a different host. what are the steps that needs to be done to make this migration smooth and retain all the data in the new database on the new host.
Created 01-06-2017 12:01 PM
@ARUN
1. Stop ambari server
2. Take your Ambari DB dump.
Example:
pg_dump -U ambari ambari > /tmp/ambari_bk.psql mysqldump -u ambari ambari > /tmp/ambari_bk.mysql
.
3. Now on the other Host import the mentioned DB dump. And moke sure that the new DB host is accessible from ambari server.
4. Now edit the ambari.properties " /etc/ambari-server/conf/ambari.properties" and add the correct JDBC URL to point to the new host:
Example:
server.jdbc.url=jdbc:oracle:thin:@oracle.database.hostname:1521/ambaridb
.
5. Now try restarting ambari server.
.
Created 01-06-2017 11:59 AM
@ARUN Please refer to the below documentation for moving ambari database to the new host.
Created 01-06-2017 12:01 PM
@ARUN
1. Stop ambari server
2. Take your Ambari DB dump.
Example:
pg_dump -U ambari ambari > /tmp/ambari_bk.psql mysqldump -u ambari ambari > /tmp/ambari_bk.mysql
.
3. Now on the other Host import the mentioned DB dump. And moke sure that the new DB host is accessible from ambari server.
4. Now edit the ambari.properties " /etc/ambari-server/conf/ambari.properties" and add the correct JDBC URL to point to the new host:
Example:
server.jdbc.url=jdbc:oracle:thin:@oracle.database.hostname:1521/ambaridb
.
5. Now try restarting ambari server.
.
Created 01-06-2017 12:39 PM
Thanks @Jay SenSharma. it really helps
Created 01-06-2017 12:07 PM
Also please check the ambari.properties and change the persistence type to remote when the DB is moved
server.persistence.type=local to server.persistence.type=remote
.
You can import the mysql dump as following on the remote Mysql host:
mysql -u ambari -pbigdata ambari < ambari_mydb_current.sql
Also please refer to the following link for preparing the mysql on the new host. (before importing the dump) http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_ambari_reference_guide/content/_using_amb...
Before importing the dump you might want to create the DB users and grand desired permissions as mentioned in the above link
.