Migrating the Altus Director Database
Altus Director provides a script to move Altus Director data from one database to another database. You can use the copy-database script to move data from the default H2 database to a supported external database. For example, if you initially used the default H2 database file to store Altus Director server data but now want to start using an external MySQL database, you can use the copy-database script to migrate Altus Director data from H2 to MySQL.
The copy-database script is available in Altus Director 6.0 and later versions. The copy-database script works with any of the databases that Altus Director supports.
- RHEL or CentOS: /usr/lib64/cloudera-director/server/bin/copy-database
- Ubuntu: /usr/lib/cloudera-director/server/bin/copy-database
Source and Destination Database
Source database. The copy-database script has an associated copy-database.properties file that specifies the source database for the script. By default, the copy-database script uses the default H2 database file state.h2.db as the source database.
To use a different source database for the copy-database script, modify the properties in the copy-database.properties file.
- Destination database. The copy-database script uses the database configured for Altus Director as the destination
database. When you configure an external database for Altus Director, you set the database properties in the application.properties file. The copy-database script uses the database properties set in the application.properties file to connect to the configured database.
The application.properties and copy-database.properties files are located in following directory in Altus Director: /etc/cloudera-director-server/
Using the copy-database Script
- Stop the Altus Director server.
Create an external database and configure Altus Director to use the external database.
For information about configuring Altus Director to use an external database, see Configuring Storage for Altus Director.
- Run the copy-database script.
The copy-database script copies the data from the source database into the database configured for Altus Director.
- Start Cloudera Altus Director server.