yb-voyager CLI
yb-voyager is a command line executable for migrating databases from PostgreSQL, Oracle, and MySQL to a YugabyteDB database.
Syntax
yb-voyager [ <migration-step>... ] [ <arguments> ... ]
-
migration-step: See Commands
-
arguments: one or more arguments, separated by spaces.
Command line help
To display the available online help, run:
yb-voyager --help
To display the available online help for any migration step, run:
yb-voyager [ <migration-step>... ] --help
Version check
To verify the version of yb-voyager installed on your machine, run:
yb-voyager version
Commands
The list of commands for various phases of migration are as follows:
- Export schema
- Analyze schema
- Import schema
- Export data
- Export data status
- Get data-migration-report
- Export data from target
- Import data
- Import data status
- Import data to source
- Import data to source-replica
- Import data file
- Cutover to target
- Cutover to source
- Cutover to source-replica
- Cutover status
- Archive changes
- End migration
SSL Connectivity
You can instruct yb-voyager to connect to the source or target database over an SSL connection. Connecting securely to PostgreSQL, MySQL, and YugabyteDB requires you to pass a similar set of arguments to yb-voyager. Oracle requires a different set of arguments.
PostgreSQL/MySQL options
The following table summarizes the arguments and options you can pass to yb-voyager to establish an SSL connection for PostgreSQL or MySQL.
Arguments | Description |
---|---|
‑‑source‑ssl‑mode | Value of this argument determines whether an encrypted connection is established between yb-voyager and the database server; and whether the certificate of the database server is verified from a CA. Options
|
--source-ssl-cert --source-ssl-key |
These two arguments specify names of the files containing SSL certificate and key, respectively. The <cert, key> pair forms the identity of the client. Note: If using accelerated data export, ensure that the keys are in the PKCS8 standard PEM format. |
‑‑source‑ssl‑root‑cert | Specifies the path to a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. |
--source-ssl-crl | Specifies the path to a file containing the SSL certificate revocation list (CRL). Certificates listed in this file, if it exists, will be rejected while attempting to authenticate the server's certificate. If using accelerated data export, this is not supported. |
Oracle options
The following table summarizes the arguments and options you can pass to yb-voyager to establish an SSL connection for Oracle:
Arguments | Description |
---|---|
‑‑oracle‑tns‑alias | A TNS (Transparent Network Substrate) alias that is configured to establish a secure connection with the server is passed to yb-voyager. When you pass --oracle-tns-alias, you cannot use any other arguments to connect to your Oracle instance including --source-db-schema and --oracle-db-sid. Note: By default, the expectation is that the wallet files (.sso, .pk12, and so on) are in the TNS_ADMIN directory (the one containing tnsnames.ora). If the wallet files are in a different directory, ensure that you update the wallet location in the sqlnet.ora file. If using accelerated data export, to specify a different wallet location, also create a ojdbc.properties file in the TNS_ADMIN directory, and add the following: oracle.net.wallet_location=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/path/to/wallet))) . |
YugabyteDB options
The following table summarizes the arguments and options you can pass to yb-voyager to establish an SSL connection for YugabyteDB.
Arguments | Description |
---|---|
--target‑ssl‑mode | Value of this argument determines whether an encrypted connection is established between yb-voyager and the database server; and whether the certificate of the database server is verified from a CA. Options
|
--target-ssl-cert --target-ssl-key |
These two arguments specify names of the files containing SSL certificate and key, respectively. The <cert, key> pair forms the identity of the client. |
‑‑target‑ssl‑root‑cert | Specifies the path to a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities. |
--target-ssl-crl | Specifies the path to a file containing the SSL certificate revocation list (CRL). Certificates listed in this file, if it exists, will be rejected while attempting to authenticate the server's certificate. |