Database Migration Utility
The Database Migration Utility migrates table data from one MFT database to another. It supports Oracle, MySQL, MS-SQL, and PostgreSQL databases. You can migrate between similar databases (for example, from a source Oracle database to a destination Oracle database) or different databases (for example, from a source Oracle database to a destination PostgreSQL database). This utility simplifies moving MFT from an on-premises installation to a cloud installation by allowing you to copy an on-premises database to a cloud database.
Restrictions
-
Database Migration Utility is designed to migrate only MFT databases.
-
Database Migration Utility can only migrate entire tables, not individual rows.
-
You must create the destination database before migrating data. The utility supports creating the destination database.
-
The destination MFT installation must either match or be of a later release than the source MFT installation.
Functionality
-
Create Database Tables: Database Migration Utility can create MFT DB tables for the selected tables.
-
Purge Database Tables: Database Migration Utility can delete all rows from the selected tables.
-
Migrate Database Data: Database Migration Utility can migrate data from the selected tables.
-
Encrypt Config File Passwords: Database Migration Utility can encrypt clear text passwords in the config file.
Configuration
The db-migrate.properties configuration file defines the source database and destination database connection properties.
Config file
The db-migrate.properties configuration file is located in the <Installation Directory>/cloud/dbconfig/config directory. Lines beginning with the # character are treated as comments.
The MFT distribution has the following sample configuration file provided with it:
#
# Source Database Settings#source.url=jdbc:oracle:thin:@<hostname>:1521/<service name> #source.driver=oracle.jdbc.driver.OracleDriver
source.userid=<user id>
source.password=<optional plaintext password>
source.type=oracle
source.mft.version=8.6
#
# Destination Database Settings
#
destination.url=jdbc:postgresql://<hostname>:5432/<database name>?stringtype=unspecified
destination.driver=org.postgresql.Driver
destination.userid=<user id>
destination.password=<optional plaintext password>
destination.type=postgres
destination.mft.version=8.6
#
# Source Tables
#
source.tables=alertaudits,Alerts,As2SrvCfg,Audits,AuditFTs,AuditsExt,AuditsExtAs2,AuditsExtOFTP2,
Authenticators,CfSrvCfg,Checkpt,CollectorSrvCfg,Config,ConfigU2U,ConnMgrNode,Dept,Devices,DocDeleted,
DocRevisions,DocShare,Documents,EncryptKeys,ErrorEvents,Events,Files,FSEvents,FtpSrvCfg,FTTransfers,
HostStats,JMSSrvCfg,JMSSrvCfgExt,LicenseKey,LoginAudit,Messages,MFAConfig,MFAMFTCfg,MFTStatistics,
NodeFTs,Nodes,NodesExt,Notifications,OFTP2SrvCfg,OIDCAuthServer,OIDCMFTCfg,OnDemandSecurity,
OnDemandUsers,PCILog,PCILogDetail,Profiles,QRTZ_JOB_DETAILS,QRTZ_TRIGGERS,QRTZ_BLOB_TRIGGERS,QRTZ_CALENDARS,QRTZ_CRON_TRIGGERS,QRTZ_FIRED_TRIGGERS,QRTZ_LOCKS,QRTZ_PAUSED_TRIGGER_GRPS,QRTZ_SCHEDULER_STATE,QRTZ_SIMPLE_TRIGGERS,QRTZ_SIMPROP_TRIGGERS,Roles,SAMLConfig,SchedulerSrvCfg,SearchAudits,ServiceLock,Sessions,SrvStatusCfg,
SSHAlgorithmGroup,SshSrvCfg,U2URequests,Attachments,Recipients,UserProfiles,Users,UsersMap#
# Commit Count
#
commit.count=500
Explanation of Properties
The following table provides the list of allowed parameters for Database Migration Utility.
| Parameter Name | Parameter Description |
|---|---|
| source.url |
Defines the DB connection URL for the source database. See the following examples for some sample DB URLs: Oracle
PostgreSQL
MySQL
MS SQL
|
| source.driver |
Defines the class name of the source DB Driver. See the following examples for some sample drivers: Oracle
PostgreSQL
MS SQL:
MySQL:
|
| source.userid | A user with rights to access the MFT database. The source user must have read rights to the tables. |
| source.password |
The password associated with the user ID. You have three options for entering the password:
|
| source.type |
Defines the source database type. The following are the valid values for the database type:
Important: Ensure that you enter the value in lowercase.
|
| source.tables |
Defines the tables to be processed. The order is important and should not be changed as some tables depend on other tables. You can remove tables if you only want to process certain tables. |
| source.mft.version |
Defines the version of MFT for the source tables. The valid MFT version values are 8.3, 8.4, 8.5, or 8.6. |
| destination.url |
Defines the DB connection URL for the destination database. See the following examples for some sample DB URLs: Oracle
PostgreSQL
MySQL
MS SQL
|
| destination.driver |
Defines the class name of the destination DB driver. See the following examples for some sample drivers: Oracle
PostgreSQL
MS SQL:
MySQL:
|
| destination.userid |
A user with rights to access the MFT database. If using the Create Database function, the destination user must have the rights to create tables. Otherwise, only write access is required. |
| destination.password |
The password associated with the user ID. You have three options for entering the password:
|
| destination.type |
Defines the destination database type. The following are the valid values for the database type:
Important: Ensure that you enter the value in lowercase.
|
| destination.mft.version |
Defines the version of MFT for the destination tables. The valid MFT version values are 8.3, 8.4, 8.5, or 8.6. |
| commit.count |
Defines the number of records to update before committing. Increasing this number may improve performance, but the best practice is to use 500 as the value. |
Setup
Complete the following steps before running the utility:
-
Copy the database driver JAR files for the source and destination databases to the
<MFT Install>/cloud/dbconfig/libdirectory. If both databases are of the same type, copy only one JAR file. If both databases are different, copy both the JAR files. -
Edit the db-migrate.properties file in the
<MFT Install>/cloud/dbconfig/configdirectory.
See the configuration file parameters provided in the Explanation of Properties section.
The DB Migration Utility is located in the <Installation Directory>/cloud/dbconfig directory.
Two scripts are available:
db-migrate.bat for Windows
db-migrate.sh for Unix/Linux
When running on Unix or Linux, you may need to run the following command to make the script executable.
chmod +x db-migrate.sh
Migrating Data
The utility uses a text-based menu. The following is a sample of the main menu:
MFT Database Migration Utility
------------------------------
Main Menu
=========
1. Create Database Tables
2. Purge Database Tables
3. Migrate Database Data
4. Encrypt Config File Passwords
5. Help
6. Exit
Please enter the number corresponding to your selection:
Explanation of Options
| Option | Description |
|---|---|
| Create Database Tables |
Use this option if the destination database does not have the necessary tables. This step creates all the required tables for the current version of MFT and purges the default rows. You are prompted to confirm before proceeding. All tables are created, regardless of the tables defined by the |
| Purge Database Tables |
This option removes all records from the database tables, which is necessary for Database Migration Utility to work. Note: When migrating to an existing destination database, remove all the data from the destination tables to avoid migration failure. Similarly, if a database migration partially completes, remove all the data from the destination tables before you retry.
You are prompted to confirm before proceeding. Only tables defined by the |
| Migrate Database Data |
This option copies data from the source database to the destination database. Only tables defined by the |
| Encrypt Config File Passwords |
This option encrypts the source password and destination password. If a password is already encrypted, it is not encrypted again. |
| Help | Displays helpful information needed to configure the utility. |
| Exit |
Exits the utility. When you exit the utility, a log file is generated. The name and location of the file is displayed on the console. |