Changing and Migrating Talend Administration Center Databases

author
Talend Documentation Team
EnrichVersion
6.4
6.3
6.2
6.1
EnrichProdName
Talend Data Fabric
Talend MDM Platform
task
Installation and Upgrade
EnrichPlatform
Talend Administration Center

Changing and Migrating Talend Administration Center Databases

You are planning to move your TAC database from H2 database to PostGreSQL (or any other database) and you wonder if this is possible without uninstalling the existing Talend Administrion Center setup? If the migration of the database without uninstalling is possible, what things should be done before/after change?
Resolution

You do not need to reinstall TAC. You can do this in place by just changing the database used on the database setup screen. The example below will work for migrating from any supported TAC backend database to any other.

Keep in mind that the configuration data in your H2 database will not be migrated. For example, if you have created entries for users, projects, Servers, or Job Conductor entries for scheduling you will need to recreate them. Configuration settings will also be lost unless you export them as shown below.

The example below uses Exporting Settings to save the Settings->Configuration data for things like the location of svn and nexus servers. If you are just starting out, this is probably not a problem and it is suggested you just re-enter the data. In other cases where you have a lot of jobs defined you might choose to use Talend Repository Manager .

In the example we are migrating from mysql to postgres and TAC is running on the same server as postgres so localhost is used for the db configuration. If that is not the case for you then you should of course use the appropriate hostname. I have called my database tac_561.

TAC comes pre-installed with H2, Mysql, and Postgres drivers. Distribution of Microsoft MSSQL and Oracle drivers is constrained by the Microsoft and Oracle licenses. For MSSQL and Oracle you will need to download and install the jdbc drivers into your TAC. Please see How to install Oracle and MS SQL drivers for Talend Administration Center .

Procedure

Prerequisite : You will need to have your license file handy.

  1. Start off by taking a zip of the entire tac directory so you can restore later if you need to.

  2. Create an empty (postgres) database and have the db owner account identified with correct database admin rights. It is sufficient for the owner to have full rights on the single database include create table table.

  3. Login to the TAC with the current H2 database. Go to the Settings->Configuration screen and select Export Parameters.

  4. Make a copy of the file you just exported. I suggest naming the first file admin_config_h2.txt and naming the copy admin_config_postgres.txt. In the new postgres config file find the config.dashboard,config.database.url property. Change it to the postgres jdbc url. A sample is shown below:

    config.dashboard,config.dashboard.jobsAnalysesUrl,http://localhost:8080/amc,true 
    config.dashboard,config.database.url,jdbc:postgresql://localhost:5432/tac
    config.dashboard,config.database.user,tadmin,true 
    config.dashboard,config.database.password,3IqdoqEElsy8Dzz9iP3HVQ==,Encrypt,true
    config.dashboard,config.database.driver,org.postgresql.Driver,true
    
  5. Now logout from TAC. You will be returned to the login screen. Click on the Go to db.config page. You will be prompted for the login. Use the same login that you established for the admin user.

  6. You will be taken to the database configuration page. The example below shows migration from mysql, but your system will show H2 or whatever your source database is. I would suggest taking a screenshot of your current H2 database settings if you have not already recorded them.

    Click on the Import parameters button and select the admin_config_postgres.sql that you just exported and edited.

  7. Click on the Check button to verify the configuration on more time. It should pass all steps but the license step. You may need to reload the license file with the Set New License. Note that the postgres driver is now showing.
  8. Return to the login page and login.

  9. If you look in the Postgres or db admin tool you will see that the schema for the tac database has been populated.

  10. Check the Settings->Configurations page. Your SVN and other settings should have been preserved.

  11. Check the Settings->Users pages. Your users need to be recreated. Likewise your projects, user project authorizations, and job conductor entries will need to be created as well.