### Install YugabyteDB Voyager via Script Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager This sequence of commands installs YugabyteDB Voyager using a provided script. It involves cloning the repository, navigating to the installer scripts directory, and executing the installation script. An option to specify a version is also available. ```bash git clone https://github.com/yugabyte/yb-voyager.git cd yb-voyager/installer_scripts ./install-yb-voyager ``` ```bash ./install-yb-voyager --version ``` -------------------------------- ### Clone YB-Voyager Repository Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Clones the YB-Voyager repository from GitHub to your local machine. This is the first step in the installation process. ```bash git clone https://github.com/yugabyte/yb-voyager.git ``` -------------------------------- ### Installer Script Options Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Provides a list of command-line options for the `install-voyager-airgapped.sh` script. These options allow for selective dependency checking, forcing installation, or focusing on specific database types (PostgreSQL, MySQL, Oracle). ```bash ./install-voyager-airgapped.sh [options] Argument | Description ---|--- -d, --check-dependencies-only | Check dependencies only and exit without installing -f, --force-install | Install packages without checking dependencies -p, --pg-only | Check/install only PostgreSQL-related dependencies -m, --mysql-only | Check/install only MySQL-related dependencies -o, --oracle-only | Check/install only Oracle-related dependencies -h, --help | Display help message ``` -------------------------------- ### Install YB-Voyager Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Executes the YB-Voyager installation script. This command installs the latest version of YB-Voyager. The script can be run multiple times safely. If it fails, check the log file at /tmp/install-yb-voyager.log. ```bash ./install-yb-voyager ``` -------------------------------- ### Navigate to Installer Scripts Directory Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Changes the current directory to the 'installer_scripts' subdirectory within the cloned YB-Voyager repository. This directory contains the necessary scripts for installation. ```bash cd yb-voyager/installer_scripts ``` -------------------------------- ### YugabyteDB Voyager Installer Script Usage Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Demonstrates how to use the YugabyteDB Voyager airgapped installer script with various options for dependency checking and selective installation. ```bash ./install-voyager-airgapped.sh [options] ``` -------------------------------- ### Verify YB-Voyager Installation Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Checks if YB-Voyager has been installed successfully by running the 'yb-voyager version' command. This command should output the installed version of YB-Voyager. ```bash yb-voyager version ``` -------------------------------- ### Download Airgapped Installer Script Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Downloads the airgapped installation script for YugabyteDB Voyager into a specified directory using wget. This script is essential for the installation process. ```bash wget -P https://raw.githubusercontent.com/yugabyte/yb-voyager/main/installer_scripts/install-voyager-airgapped.sh ``` -------------------------------- ### Install PostgreSQL 16 Dependencies Source: https://docs.yugabyte.com/stable/yugabyte-voyager/ubuntu Installs the postgresql-common package and configures the apt repository to fetch PostgreSQL 16. This ensures that the necessary PostgreSQL client libraries are available for yb-voyager. ```bash sudo apt install -y postgresql-common sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh ``` -------------------------------- ### Install YugabyteDB Voyager Source: https://docs.yugabyte.com/stable/yugabyte-voyager/ubuntu Installs the yb-voyager package and its automatically resolved dependencies using apt-get. This command fetches and installs the core yb-voyager software. ```bash sudo apt-get install yb-voyager ``` -------------------------------- ### Install Oracle instant client repositories (RHEL/CentOS) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Installs the Oracle Instant Client repositories on RHEL 8 and CentOS 8 systems. These repositories are necessary for yb-voyager to connect to Oracle source databases. ```bash sudo yum install oracle-instant-clients-repo ``` -------------------------------- ### Source YB-Voyager Environment Variables Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Sources the '.yb-voyager.rc' file, which is generated in the home directory after installation. This command sets up the necessary environment variables for YB-Voyager to function correctly. ```bash source ~/.yb-voyager.rc ``` -------------------------------- ### Update PATH and Environment Variables for PostgreSQL 17 Source: https://docs.yugabyte.com/stable/yugabyte-voyager/macos Configures your shell's PATH and environment variables to include PostgreSQL 17 binaries and libraries. This example is for zsh and assumes a specific Homebrew installation path; adjust as per Homebrew's output. ```bash echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc export LDFLAGS="-L/opt/homebrew/opt/postgresql@17/lib" export CPPFLAGS="-I/opt/homebrew/opt/postgresql@17/include" ``` -------------------------------- ### Import Schema with Post-Snapshot and Refresh Materialized Views Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/schema-migration/import-schema This example illustrates importing schema with the `--post-snapshot-import` and `--refresh-mviews` flags enabled. These options are used for post-import data processing and refreshing materialized views on the target database. ```bash yb-voyager import schema --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 \ --post-snapshot-import true \ --refresh-mviews true ``` -------------------------------- ### Import Schema using Configuration File Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/schema-migration/import-schema This example demonstrates how to import schema using a configuration file with yb-voyager. The configuration file should specify the necessary parameters for the import operation. ```bash yb-voyager import schema --config-file ``` -------------------------------- ### MySQL Partitioned Table with Primary Key Schema Example Source: https://docs.yugabyte.com/stable/yugabyte-voyager/known-issues/mysql Illustrates a MySQL table partitioned by an expression (year of bill_date) that includes a primary key. This configuration is invalid in YugabyteDB, and the snippet shows the original schema, exported schema, and the suggested workaround. ```sql /* Table definition */ CREATE TABLE Sales ( cust_id INT NOT NULL, name VARCHAR(40), store_id VARCHAR(20) NOT NULL, bill_no INT NOT NULL, bill_date DATE NOT NULL, amount DECIMAL(8,2) NOT NULL, PRIMARY KEY (bill_no,bill_date) ) PARTITION BY RANGE (year(bill_date))( PARTITION p0 VALUES LESS THAN (2016), PARTITION p1 VALUES LESS THAN (2017), PARTITION p2 VALUES LESS THAN (2018), PARTITION p3 VALUES LESS THAN (2020) ); ``` ```sql /* Table definition */ CREATE TABLE sales ( cust_id bigint NOT NULL, name varchar(40), store_id varchar(20) NOT NULL, bill_no bigint NOT NULL, bill_date timestamp NOT NULL, amount decimal(8,2) NOT NULL, PRIMARY KEY (bill_no,bill_date) ) PARTITION BY RANGE ((extract(year from date(bill_date)))) ; ``` ```sql CREATE TABLE sales ( cust_id bigint NOT NULL, name varchar(40), store_id varchar(20) NOT NULL, bill_no bigint NOT NULL, bill_date timestamp NOT NULL, amount decimal(8,2) NOT NULL ) PARTITION BY RANGE ((extract(year from date(bill_date)))) ; ``` -------------------------------- ### MySQL Foreign Key Constraint on Subset of Unique Key Example Source: https://docs.yugabyte.com/stable/yugabyte-voyager/known-issues/mysql Shows a MySQL schema where a foreign key references a column that is part of a unique key. This is not allowed in YugabyteDB, and the snippet includes the source schema, exported schema, the error encountered, and the suggested fix. ```sql create table k(id int,id2 int,UNIQUE KEY `uk_k` (`id`,`id2`)); create table h(id int,CONSTRAINT `fk_h` FOREIGN KEY (`id`) REFERENCES `k` (`id`)); ``` ```sql CREATE TABLE h ( id bigint ) ; CREATE TABLE k ( id bigint, id2 bigint ) ; ALTER TABLE k ADD UNIQUE (id,id2); ALTER TABLE h ADD CONSTRAINT fk_h FOREIGN KEY (id) REFERENCES k(id) MATCH SIMPLE ON DELETE NO ACTION ON UPDATE NO ACTION; ``` ```sql ERROR: there is no unique constraint matching given keys for referenced table "k" ``` ```sql ALTER TABLE k ADD UNIQUE (id); ``` -------------------------------- ### Import Schema using CLI Arguments Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/schema-migration/import-schema This example shows how to import schema directly via the command-line interface (CLI) using yb-voyager. It specifies essential parameters like export directory and target database connection details. ```bash yb-voyager import schema --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 ``` -------------------------------- ### Install YugabyteDB Voyager on macOS using Homebrew Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Installs YugabyteDB Voyager on macOS using Homebrew. This involves tapping the Yugabyte repository, installing PostgreSQL 17, and then installing yb-voyager. ```bash brew tap yugabyte/tap brew install postgresql@17 # Example PATH update (follow Homebrew's specific instructions) echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc export LDFLAGS="-L/opt/homebrew/opt/postgresql@17/lib" export CPPFLAGS="-I/opt/homebrew/opt/postgresql@17/include" # Verify PostgreSQL installation pg_dump --version pg_restore --version # Install yb-voyager brew install yb-voyager # Install a specific version (optional) # brew install yb-voyager@ # Verify yb-voyager installation yb-voyager version ``` -------------------------------- ### Prepare Oracle Source-Replica Database Metadata Schema Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-fall-forward Sets up the 'ybvoyager_metadata' schema and necessary tables for Oracle databases. This includes creating a user, granting privileges, and defining metadata tables for tracking migration batches and events. ```sql CREATE USER ybvoyager_metadata IDENTIFIED BY "password"; GRANT CONNECT, RESOURCE TO ybvoyager_metadata; ALTER USER ybvoyager_metadata QUOTA UNLIMITED ON USERS; --upgraded to ybvoyager_import_data_batches_metainfo_v3 post v1.6 CREATE TABLE ybvoyager_metadata.ybvoyager_import_data_batches_metainfo_v3 ( migration_uuid VARCHAR2(36), data_file_name VARCHAR2(4000), batch_number NUMBER(10), schema_name VARCHAR2(4000), table_name VARCHAR2(4000), rows_imported NUMBER(19), PRIMARY KEY (migration_uuid, data_file_name, batch_number, schema_name, table_name) ); CREATE TABLE ybvoyager_metadata.ybvoyager_import_data_event_channels_metainfo ( migration_uuid VARCHAR2(36), channel_no INT, last_applied_vsn NUMBER(19), num_inserts NUMBER(19), num_updates NUMBER(19), num_deletes NUMBER(19), PRIMARY KEY (migration_uuid, channel_no) ); CREATE TABLE ybvoyager_metadata.ybvoyager_imported_event_count_by_table ( migration_uuid VARCHAR2(36), table_name VARCHAR2(4000), channel_no INT, total_events NUMBER(19), num_inserts NUMBER(19), num_updates NUMBER(19), num_deletes NUMBER(19), PRIMARY KEY (migration_uuid, table_name, channel_no) ); ``` -------------------------------- ### Run YugabyteDB Voyager Installer Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Executes the YugabyteDB Voyager airgapped installation script. This script checks for dependencies and installs Voyager, Debezium, and Ora2pg. ```bash ./install-voyager-airgapped.sh ``` -------------------------------- ### Install yb-voyager Wrapper Script Source: https://docs.yugabyte.com/stable/yugabyte-voyager/docker Downloads the yb-voyager wrapper script from GitHub, makes it executable, and moves it to the system's bin directory for easy access. This method allows running yb-voyager commands directly from the host machine. ```bash wget -O ./yb-voyager https://raw.githubusercontent.com/yugabyte/yb-voyager/main/docker/yb-voyager-docker && \ chmod +x ./yb-voyager && \ sudo mv yb-voyager /usr/local/bin/yb-voyager ``` -------------------------------- ### Install yb-voyager on RHEL 9/CentOS 9 using dnf Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager This sequence of commands installs yb-voyager on RHEL 9 and CentOS 9. It involves updating the system, adding the YugabyteDB repository, installing EPEL and MySQL repositories, configuring PostgreSQL, and finally installing yb-voyager and its dependencies. Oracle Instant Clients are also installed. ```bash sudo dnf update sudo dnf install https://software.yugabyte.com/repos/reporpms/rhel-9/yb-yum-repo-1.1-0.noarch.rpm -y sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y sudo dnf install https://dev.mysql.com/get/mysql84-community-release-el9-2.noarch.rpm -y sudo dnf --disablerepo=* install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y sudo dnf -qy module disable postgresql sudo dnf install perl-open.noarch -y OIC_URL="https://download.oracle.com/otn_software/linux/instantclient/215000" && \ sudo dnf install -y \ ${OIC_URL}/oracle-instantclient-tools-21.5.0.0.0-1.x86_64.rpm \ ${OIC_URL}/oracle-instantclient-basic-21.5.0.0.0-1.x86_64.rpm \ ${OIC_URL}/oracle-instantclient-devel-21.5.0.0.0-1.x86_64.rpm \ ${OIC_URL}/oracle-instantclient-jdbc-21.5.0.0.0-1.x86_64.rpm \ ${OIC_URL}/oracle-instantclient-sqlplus-21.5.0.0.0-1.x86_64.rpm sudo dnf update sudo dnf install yb-voyager ``` -------------------------------- ### Export Data Live Migration CLI Example Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/data-migration/export-data This example shows how to initiate a live data migration using the YugabyteDB Voyager CLI. It includes source database details, export directory, and specifies the export type for continuous synchronization. ```bash yb-voyager export data from source --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 \ --export-type "snapshot-and-change" ``` -------------------------------- ### Locate Live Migration Configuration Template Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-migrate Provides paths to the `live-migration.yaml` template file for YugabyteDB Voyager. This template should be copied to the migration folder and then configured with specific migration parameters. ```bash /opt/yb-voyager/config-templates/live-migration.yaml ``` ```bash $(brew --cellar)/yb-voyager@//config-templates/live-migration.yaml ``` -------------------------------- ### Initiate Cutover to Target using Config File Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-fall-back Initiates the cutover process to switch the application from the source database to the target YugabyteDB database. This involves adding configuration to prepare for fallback and then running the command. ```yaml ... inititate-cutover-to-target: prepare-for-fall-back: true ... ``` -------------------------------- ### Live Data Import using Configuration File Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/data-migration/import-data Starts a live data import to the target database using a configuration file. This command is designed for scenarios where data needs to be migrated while the source database remains active. ```bash yb-voyager import data to target --config-file ``` -------------------------------- ### Initiate Cutover to Target using CLI Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-fall-back Initiates the cutover process to switch the application from the source database to the target YugabyteDB database. This command is executed via the CLI, specifying the configuration file. ```bash yb-voyager initiate cutover to target --config-file ``` -------------------------------- ### Import Data File from Local Disk (CSV) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/bulk-data-load/import-data-file Imports data from CSV files located on the local disk into YugabyteDB. This example demonstrates using `--data-dir` to specify the local directory containing CSV files and `--file-table-map` to map these files to database tables. It assumes CSV files have headers and use default delimiters and quote characters. ```bash yb-voyager import data file --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 \ --data-dir /dir/data-dir \ --file-table-map 'accounts.csv:accounts,transactions.csv:transactions' \ --format csv \ --has-header true ``` -------------------------------- ### Install YugabyteDB Voyager using Homebrew Source: https://docs.yugabyte.com/stable/yugabyte-voyager/macos Installs the latest stable version of yb-voyager and its dependencies using Homebrew. You can also install a specific version using the provided format. ```bash brew install yb-voyager ``` ```bash brew install yb-voyager@ ``` -------------------------------- ### Assess Migration with Direct Source DB Connectivity (yb-voyager) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/assess-migration Initiates a live migration assessment by directly connecting to the source PostgreSQL database. This command gathers necessary metadata for the assessment. It requires specifying source database connection details and an export directory. This method is suitable when direct access to the source database is available. ```bash yb-voyager assess-migration --source-db-type postgresql \ --source-db-host hostname \ --source-db-user ybvoyager \ --source-db-password password \ --source-db-name dbname \ --source-db-schema schema1,schema2 \ --export-dir /path/to/export/dir ``` ```bash yb-voyager assess-migration --config-file ``` -------------------------------- ### Install Specific YB-Voyager Version Source: https://docs.yugabyte.com/stable/yugabyte-voyager/github Installs a specific version of YB-Voyager by providing the --version flag followed by the desired version number. This allows for controlled deployment of YB-Voyager. ```bash ./install-yb-voyager --version ``` -------------------------------- ### Import Data to Source-Replica using Configuration File Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/data-migration/import-data This snippet demonstrates how to import data to a source-replica database by specifying a configuration file. The `--config-file` parameter points to the location of the configuration file. ```bash yb-voyager import data to source-replica --config-file ``` -------------------------------- ### Install yb-voyager on Ubuntu 22 using apt Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager This sequence of commands installs yb-voyager on Ubuntu 22. It involves adding the YugabyteDB apt repository, installing PostgreSQL common packages and repositories, cleaning the apt cache, and then installing yb-voyager and its dependencies. It also includes a workaround for potential ora2pg version conflicts. ```bash wget https://software.yugabyte.com/repos/reporpms/yb-apt-repo_1.0.0_all.deb sudo apt-get install ./yb-apt-repo_1.0.0_all.deb sudo apt install -y postgresql-common sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh sudo apt-get clean sudo apt-get update sudo apt-get install yb-voyager ``` -------------------------------- ### Initiate Cutover to Target Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-fall-back Initiates the cutover process, switching the application from the source database to the target YugabyteDB database. ```APIDOC ## POST /initiate-cutover-to-target ### Description Initiates the cutover process, switching your application from the source database to the target YugabyteDB database. This should be performed after monitoring that the import of events is catching up to the exported events and the export rate drops to 0. ### Method POST ### Endpoint /initiate-cutover-to-target ### Parameters #### Query Parameters - **config-file** (string) - Optional - Path to the configuration file. The configuration can include `initiate-cutover-to-target` settings like `prepare-for-fall-back: true`. ### Request Example ```yaml # Example configuration snippet initiate-cutover-to-target: prepare-for-fall-back: true ``` ```bash yb-voyager initiate cutover to target --config-file ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message that the cutover process has been initiated. #### Response Example ```json { "message": "Cutover to target initiated successfully." } ``` ``` -------------------------------- ### Install YB-Voyager using Yum on RHEL 8 Source: https://docs.yugabyte.com/stable/yugabyte-voyager/rhel Installs YB-Voyager and its dependencies on RHEL 8 systems using the yum package manager. This process involves updating the system, adding the YugabyteDB repository, EPEL, Oracle Instant Client, and PostgreSQL repositories, disabling the default PostgreSQL module, and then installing the 'yb-voyager' package. It also shows how to install a specific version and verify the installation. ```bash sudo yum update sudo yum install https://software.yugabyte.com/repos/reporpms/rhel-8/yb-yum-repo-1.1-0.noarch.rpm sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo yum install oracle-instant-clients-repo sudo yum --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm sudo dnf -qy module disable postgresql sudo yum install perl-open.noarch sudo yum update sudo yum install yb-voyager sudo yum install yb-voyager- yb-voyager version ``` -------------------------------- ### yb-voyager compare-performance CLI Usage Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/compare-performance This snippet shows the basic command-line usage for the yb-voyager compare-performance command. It outlines the general syntax and provides an example of how to invoke the command with specific target database and export directory parameters. ```bash Usage: yb-voyager compare-performance [ ... ] ``` ```bash yb-voyager compare-performance --target-db-host localhost \ --target-db-port 5433 \ --target-db-name yugabyte \ --target-db-user yugabyte \ --target-db-password password \ --export-dir /dir/export-dir ``` -------------------------------- ### Resolve ora2pg Version Conflict and Install YugabyteDB Voyager Source: https://docs.yugabyte.com/stable/yugabyte-voyager/ubuntu Addresses a potential dependency conflict with ora2pg by installing a specific version (23.2-yb.2) and then proceeding with the yb-voyager installation. This is a workaround for specific versioning issues. ```bash sudo apt-get install ora2pg=23.2-yb.2 sudo apt-get install yb-voyager ``` -------------------------------- ### Make Installer Script Executable Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Grants execute permissions to the downloaded YugabyteDB Voyager airgapped installation script using chmod. This allows the script to be run. ```bash chmod +x /path/to/directory/install-voyager-airgapped.sh ``` -------------------------------- ### Install perl-open (RHEL/CentOS) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Installs the 'perl-open' package on RHEL 8 and CentOS 8 systems. This is a Perl module that might be a dependency for yb-voyager or its related tools. ```bash sudo yum install perl-open.noarch ``` -------------------------------- ### Initiate Cutover to Source-Replica Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/live-fall-forward Initiates the cutover process to switch your application from the target YugabyteDB database to the source-replica database. This is an optional step performed only if the target database is not functioning as expected. ```APIDOC ## POST /yb-voyager/initiate-cutover-to-source-replica ### Description Initiates the cutover process to switch your application from the target YugabyteDB database to the source-replica database. This is an optional step performed only if the target database is not functioning as expected. ### Method POST ### Endpoint /yb-voyager/initiate-cutover-to-source-replica ### Parameters #### Query Parameters - **config-file** (string) - Optional - Path to the configuration file. - **export-dir** (string) - Optional - Directory where export data is stored. ### Request Example ```json { "config_file": "/path/to/config.conf", "export_dir": "/path/to/export" } ``` ### Response #### Success Response (200) - **message** (string) - Indicates the cutover process has been initiated. #### Response Example ```json { "message": "Cutover to source-replica initiated successfully." } ``` ``` -------------------------------- ### YugabyteDB Voyager Configuration Example (YAML) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/migrate/bulk-data-load An example snippet of a YugabyteDB Voyager configuration file (bulk-data-load.yaml). It shows how to set the export directory and target database connection parameters. ```yaml # Replace the argument values with those applicable for your migration. export-dir: target: db-host: db-port: db-name: db-schema: # MySQL and Oracle only db-user: db-password: # Enclose the password in single quotes if it contains special characters. ``` -------------------------------- ### Install PostgreSQL repositories (RHEL/CentOS) Source: https://docs.yugabyte.com/stable/yugabyte-voyager/install-yb-voyager Installs the PostgreSQL yum repositories for EL-8 systems. These repositories provide PostgreSQL client libraries and tools required by yb-voyager. ```bash sudo yum --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm ``` -------------------------------- ### Import Data to Source-Replica using CLI Arguments Source: https://docs.yugabyte.com/stable/yugabyte-voyager/reference/data-migration/import-data This snippet shows how to import data to a source-replica database directly via the command-line interface. It includes essential parameters such as export directory, database host, user, password, database name, schema, and parallel jobs. ```bash yb-voyager import data to source-replica --export-dir /dir/export-dir \ --source-replica-db-host 127.0.0.1 \ --source-replica-db-user ybvoyager \ --source-replica-db-password 'password' \ --source-replica-db-name source_replica_db \ --source-replica-db-schema source_replica_schema \ --parallel-jobs 12 ```