assess migration reference TECH PREVIEW

yb-voyager assess-migration

The following page describes the following assess commands:

assess migration

Assess the migration from source (PostgreSQL, Oracle) database to YugabyteDB.

Syntax

Usage: yb-voyager assess-migration [ <arguments> ... ]

Arguments

The valid arguments for assess migration are described in the following table:

CLI flag
Config file parameter Description
--run-guardrails-checks
assess-migration:
  run-guardrails-checks:
Run guardrails checks during migration.
Default: true
Accepted values: true, false, yes, no, 0, 1
--assessment-metadata-dir
assess-migration:
  assessment-metadata-dir:
Directory path where assessment metadata like source database metadata and statistics are stored. Optional flag, if not provided, it will be assumed to be present at default path inside the export directory.
--iops-capture-interval
assess-migration:
  iops-capture-interval:
Interval (in seconds) at which Voyager will gather IOPS metadata from the source database for the given schema(s).
Default: 120
--target-db-version
assess-migration:
  target-db-version:
Specifies the target version of YugabyteDB in the format A.B.C.D.
Default: latest stable version
--oracle-db-sid
source:
  oracle-db-sid:
Oracle System Identifier you can use while exporting data from Oracle instances. Oracle migrations only.
--oracle-home
source:
  oracle-home:
Path to set $ORACLE_HOME environment variable. tnsnames.ora is found in $ORACLE_HOME/network/admin. Oracle migrations only.
--oracle-tns-alias
source:
  oracle-tns-alias:
TNS (Transparent Network Substrate) alias configured to establish a secure connection with the server. Oracle migrations only.
--send-diagnostics
send-diagnostics:
Enable or disable sending diagnostics information to Yugabyte.
Default: true
Accepted parameters: true, false, yes, no, 0, 1
--source-db-host
source:
  db-host:
Domain name or IP address of the machine on which the source database server is running.
Default: localhost
--source-db-name
source:
  db-name:
Source database name.
--source-db-password
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
source:
  db-port:
Source database server port number.
Default: PostgreSQL (5432), Oracle (1521)
--source-db-schema
source:
  db-schema:
Source schema name(s) to export. In case of PostgreSQL, it can be single or a comma-separated list of schemas: schema1,schema2,schema3.
--source-db-type
source:
  db-type:
Source database type (postgresql, oracle).
--source-db-user
source:
  db-user:
Username of the source database.
--source-ssl-cert
source:
  ssl-cert:
Path to a file containing the certificate which is part of the SSL <cert,key> pair.
--source-ssl-crl
source:
  ssl-crl:
Path of the file containing source SSL Root Certificate Revocation List (CRL).
--source-ssl-key
source:
  ssl-key:
Path to a file containing the key which is part of the SSL <cert,key> pair.
--source-ssl-mode
source:
  ssl-mode:
One of disable, allow, prefer(default), require, verify-ca, or verify-full.
--source-ssl-root-cert
source:
  ssl-root-cert:
Path of the file containing source SSL Root Certificate.
-e, --export-dir
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.
--start-clean Cleans up the project directory for schema or data files depending on the export command.
Default: false
Accepted parameters: true, false, yes, no, 0, 1.
-h, --help Command line help.
-y, --yes Answer yes to all prompts during the export schema operation.
Default: false
Accepted parameters: true, false, yes, no, 0, 1

Example

Configuration file:

yb-voyager assess-migration --config-file <path-to-config-file>

CLI:

yb-voyager assess-migration --source-db-type postgresql \
        --source-db-host hostname --source-db-user username \
        --source-db-password password --source-db-name dbname \
        --source-db-schema schema1,schema2 --export-dir /path/to/export/dir

assess migration bulk

Assess the migration from multiple source (Oracle) database schemas to YugabyteDB.

Syntax

Usage: yb-voyager assess-migration-bulk [ <arguments> ... ]

Arguments

The valid arguments for assess migration bulk are described in the following table:

Argument
Description/valid options
--bulk-assessment-dir Directory path where assessment data is output.
--continue-on-error Print the error message to the console and continue to next schema assessment.
Default: true.
Accepted parameters: true, false, yes, no, 0, 1.
--fleet-config-file Path to the CSV file with connection parameters for schema(s) to be assessed. The first line must be a header row.
Fields (case-insensitive): 'source-db-type', 'source-db-host', 'source-db-port', 'source-db-name', 'oracle-db-sid', 'oracle-tns-alias', 'source-db-user', 'source-db-password', 'source-db-schema'.
Mandatory: 'source-db-type', 'source-db-user', 'source-db-schema', and one of ['source-db-name', 'oracle-db-sid', 'oracle-tns-alias'].
-h, --help Command line help.
--send-diagnostics Enable or disable sending diagnostics information to Yugabyte.
Default: true
Accepted parameters: true, false, yes, no, 0, 1
--start-clean Cleans up the project directory for schema or data files depending on the export command.
Default: false
Accepted parameters: true, false, yes, no, 0, 1.
-y, --yes Assume answer to all prompts during migration.
Default: false

Example

yb-voyager assess-migration-bulk \
    --fleet-config-file /path/to/fleet_config_file.csv \
    --bulk-assessment-dir /path/to/bulk-assessment-dir \
    --continue-on-error true \
    --start-clean true

The following is an example fleet configuration file.

source-db-type,source-db-host,source-db-port,source-db-name,oracle-db-sid,oracle-tns-alias,source-db-user,source-db-password,source-db-schema
oracle,example-host1,1521,ORCL,,,admin,password,schema1
oracle,example-host2,1521,,ORCL_SID,,admin,password,schema2
oracle,,,,,tns_alias,oracle_user,password,schema3