finalize-schema-post-data-import reference

yb-voyager finalize-schema-post-data-import

Finalize the schema post the import of data into YugabyteDB database.

Create indexes and triggers in the target schema, and refresh the materialized views. Must be done after import data is complete.

Syntax

Usage: yb-voyager finalize-schema-post-data-import [ <arguments> ...] 

Arguments

The valid arguments for finalize-schema-post-data-import are described in the following table:

Argument
Description/valid options
--continue-on-error Continue to import all the exported schema even if there are errors, and output all the erroneous DDLs to the failed.sql file in the export-dir/schema directory.
Default: false
Example: yb-voyager finalize-schema-post-data-import ... --continue-on-error true
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.
--ignore-exist Ignore if an object already exists on the target database.
Default: false
Example: yb-voyager finalize-schema-post-data-import ... --ignore-exist true
Accepted parameters: true, false, yes, no, 0, 1
--refresh-mviews Refreshes the materialized views on target during the post-import-data phase.
Default: false
Accepted parameters: true, false, yes, no, 0, 1
--run-guardrails-checks Run guardrails checks during migration.
Default: true
Accepted values: true, false, yes, no, 0, 1
--send-diagnostics Enable or disable sending diagnostics information to Yugabyte.
Default: true
Accepted parameters: true, false, yes, no, 0, 1
--target-db-host Domain name or IP address of the machine on which target database server is running.
Default: 127.0.0.1
--target-db-name Target database name.
Default: yugabyte
--target-db-password Target database password. Alternatively, you can also specify the password by setting the environment variable TARGET_DB_PASSWORD. If you don't provide a password via the CLI or environment variable during any migration phase, yb-voyager will prompt you at runtime for a password. If the password contains special characters that are interpreted by the shell (for example, # and $), enclose the password in single quotes.
--target-db-port Port number of the target database server.
Default: 5433
--target-db-schema Schema name of the target YugabyteDB database. MySQL and Oracle migrations only.
--target-db-user Username of the target YugabyteDB database.
--target-ssl-cert Path to a file containing the certificate which is part of the SSL <cert,key> pair.
--target-ssl-key Path to a file containing the key which is part of the SSL <cert,key> pair.
--target-ssl-crl Path to a file containing the SSL certificate revocation list (CRL).
--target-ssl-mode Specify the SSL mode for the target database as one of disable, allow, prefer (default), require, verify-ca, or verify-full.
--target-ssl-root-cert Path to a file containing SSL certificate authority (CA) certificate(s).
-y, --yes Answer yes to all prompts during the export schema operation.
Default: false

Example of the command:

yb-voyager finalize-schema-post-data-import --export-dir /dir/export-dir \
        --target-db-host 127.0.0.1 \
        --target-db-user ybvoyager \
        --target-db-password 'password' \
        --target-db-name target_db \
        --target-db-schema target_schema \
        --refresh-mviews true