Note: Note: be sure you do not try to upgrade Mango and convert a database at the same time.

In this section we will discuss how to convert a database. There are a few kind of conversion you can do:

  • Derby to H2
  • Derby to MySQL
  • H2 to MySQL

You can also use the NoSQL module and migrate the historical values from a Derby, H2 or MySQL database. This also works to migrate historical values from an older Mango M2M database as way of retaining all data when migrating from Mango M2M to Mango Automation.

You will find the database conversion settings in the file

# Database settings for conversion. If the db.* settings point to a new database instance, and the convert type setting
# is set, Mango Automation will attempt to convert from the convert.db.* settings to the db.* settings
# Note that database conversions should not be performed in the same step as an upgrade. First upgrade, then convert.

The convert.db.type= (derby, h2, mysql) is the database you are converting from and the url, username and passwords are for that database.

This database will be converted to the main database type set in the file.

Note: When converting to H2 you need to make sure there is not an existing H2 database. If the conversion fails check in the MA_HOME/databases and make sure there is no ma.h2.db file