Migrating database X to database Y

Talend ESB Installation Guide for Linux

EnrichVersion
6.5
EnrichProdName
Talend ESB
task
Installation and Upgrade
EnrichPlatform
Talend Activity Monitoring Console
Talend Log Server
Talend Data Preparation
Talend Identity and Access Management
Talend Administration Center
Talend Artifact Repository
Talend Studio
Talend Data Stewardship
Talend CommandLine
Talend Installer
Talend Runtime
Talend ESB

If you want to migrate from one database to another, for example from H2 to MySQL, you need to use the MetaServlet command called migrateDatabase.

As the source database is updated during the migration process, it is mandatory to back it up before migrating it.

The MetaServlet application is located in <TomcatPath>/webapps/<TalendAdministrationCenter>/WEB-INF/classes folder.

To display the help of this command (with related parameters), you need to enter the following in the MetaServlet application:

./MetaServletCaller.sh --tac-url=<yourApplicationURL> -h migrateDatabase

For more information on the MetaServlet application, see the Talend Administration Center User Guide.

See below an example of migration between H2 and MySQL databases.

To be able to use this command, you need to put it on one single line first.

./MetaServletCaller.sh --tac-url http://localhost:8080/org.talend.administrator --json-params='{"actionName":"migrateDatabase","dbConfigPassword":"admin","mode":"synchronous","sourcePasswd":"tisadmin","sourceUrl":"jdbc:h2:/home/Talend/6.4.1/tac/apache-tomcat-8.0.20/webapps/org.talend.administrator/WEB-INF/database/talend_administrator","sourceUser":"tisadmin","targetPasswd":"root","targetUrl":"jdbc:mysql://localhost:3306/base","targetUser":"root"}'