Using the External Migrator

To use the External Migrator, run the following command:

./ibextmigrator options

The available External Migrator options are listed in the following table.

Option

Description

-h [ - -help]

Prints help messages.

-f [ - -force ]

Continues migration, even if an error occurs.

-v [ - -verbose ]

Shows more details.

-b [ - -pg-bin ] arg

PostgreSQL installation path.

-u [ - -pg-user ] arg

PostgreSQL user used to create the migration database.

-s [ - -src-datadir ] arg

Source MySQL datadir.

-i [ - -dst-ibdatadir ] arg

Destination Hyperstage Server datadir (ib_data).

-p [ - -dst-pgdatadir ] arg

Destination PostgreSQL datadir (pg_data).

-d [ - -dst-db ] arg

Destination PostgreSQL database name.

-t [ - -tables ] arg

List of tables to migrate in the form "db1.t1 db2.t3 db2.*" where * implies migration of every table in the database. If not specified, the External Migrator will attempt to migrate the entire datadir.

-c [ - -dst-schema ] arg (=public)

Name of destination schema to which tables specified with the -t option should be migrated. Defaults to public.

- -connection-db arg (=template1)

Database that External Migrator will use to connect to PostgreSQL.

- -force-charset-conversion [=arg(=utf8)]

Specifying this option will turn off the option to check if all data selected for migration has a common character set, and will trigger the conversion to the specified character set, if necessary. The default character set is UTF8. You can also use this option to trigger conversion of all data to specified charset.

Note: Using this setting will significantly increase the time that it takes to complete the migration.

- -version

Print program version number and exit.

The following code is an example of the migration command for all the tables within a MySQL database named salesdatabase, to a PostgreSQL database named salesdatabase.

c:\ibi\srv77\home06Hyperstage\hs\bin>ibextmigrator.exe
-b "C:\ibi\srv77\home06Hyperstage\hs\bin" -u srvadmin
-s "C:\HyperstageMySQL\Data" 
-p "C:\HyperstagePG\pg_data"
-i "C:\HyperstagePG\ib_data" 
-d salesdatabase
-t "salesdatabase.*"
 

The following code is an example of the migration command for all of the tables within a MySQL database named salesdatabase, to a PostgreSQL database named salesdatabase. In this example, the option to check if all data selected for migration has a common character set is also included, and will force the character set conversion to UTF8.

c:\ibi\srv77\home06Hyperstage\hs\bin>ibextmigrator.exe
-b "C:\ibi\srv77\home06Hyperstage\hs\bin" -u srvadmin
-s "C:\HyperstageMySQL\Data" 
-p "C:\HyperstagePG\pg_data"
-i "C:\HyperstagePG\ib_data" 
-d salesdatabase
-t "salesdatabase.*" 
--force-charset-conversion=utf8

WebFOCUS