export schema reference
yb-voyager export schema
Export the schema from the source database.
Syntax
Usage: yb-voyager export schema [ <arguments> ... ]
Arguments
The valid arguments for export schema are described in the following table:
Argument | Description/valid options |
---|---|
--assessment-report-path | Path to the generated assessment report file (JSON format) to be used for applying recommendation to exported schema. |
--skip-recommendations | Disable applying recommendations in the exported schema suggested by the migration assessment report. Default: false Accepted parameters: true, false, yes, no, 0, 1 |
--comments‑on‑objects | Enable export of comments associated with database objects. Default: false Accepted parameters: true, false, yes, no, 0, 1 |
-e, --export-dir |
Path to the export directory. This directory is a workspace used to store exported schema DDL files, export data files, migration state, and a log file. |
-h, --help | Command line help for schema. |
--object-type-list, ‑‑exclude‑object‑type‑list |
Comma-separated list of objects to export (--object-type-list) or not (--exclude-object-type-list). You can provide only one of the arguments at a time. Example: yb-voyager export schema …. –object-type-list "TABLE,FUNCTION,VIEW" Accepted parameters:
|
--oracle-db-sid |
Oracle System Identifier you can use while exporting data from Oracle instances. Oracle migrations only. |
--oracle-home |
Path to set $ORACLE_HOME environment variable. tnsnames.ora is found in $ORACLE_HOME/network/admin . Oracle migrations only. |
--oracle-tns-alias |
TNS (Transparent Network Substrate) alias configured to establish a secure connection with the server. Oracle migrations only. |
--send-diagnostics | Enable or disable sending diagnostics information to Yugabyte. Default: true Accepted parameters: true, false, yes, no, 0, 1 |
--source-db-host | Domain name or IP address of the machine on which the source database server is running. |
--source-db-name | Source database name. |
--source-db-password | Password to connect to the source database. If you don't provide a password via the CLI during any migration phase, yb-voyager will prompt you at runtime for a password. Alternatively, you can also specify the password by setting the environment variable SOURCE_DB_PASSWORD . If the password contains special characters that are interpreted by the shell (for example, # and $), enclose it in single quotes. |
--source-db-port | Port number of the source database server. |
--source-db-schema | Schema name of the source database. Not applicable for MySQL. |
--source-db-type | One of postgresql , mysql , or oracle . |
--source-db-user | Name of the source database user (typically ybvoyager ). |
--source-ssl-cert | Path to a file containing the certificate which is part of the SSL <cert,key> pair. |
--source-ssl-key | Path to a file containing the key which is part of the SSL <cert,key> pair. |
--source-ssl-crl | Path to a file containing the SSL certificate revocation list (CRL). |
--source-ssl-mode | One of disable , allow , prefer (default), require , verify-ca , or verify-full . |
--source-ssl-root-cert | Path to a file containing SSL certificate authority (CA) certificate(s). |
--start-clean | Starts a fresh schema export after clearing the schema directory.Default: false Accepted parameters: true, false, yes, no, 0, 1 |
--use-orafce | Use the Orafce extension. Oracle migrations only. Default: true Accepted parameters: true, false, yes, no, 0, 1 |
-y, --yes | Answer yes to all prompts during the export schema operation. Default: false |
Example
yb-voyager export schema --export-dir /dir/export-dir \
--source-db-type oracle \
--source-db-host 127.0.0.1 \
--source-db-port 1521 \
--source-db-user ybvoyager \
--source-db-password 'password' \
--source-db-name source_db \
--source-db-schema source_schema \
--start-clean true