Install
Prerequisites
The following sections describe the prerequisites for installing YugabyteDB Voyager.
Operating system
You can install YugabyteDB Voyager on the following:
- RHEL 8
- CentOS 8
- Ubuntu 18.04, 20.04, 22.04
- macOS (For MySQL/Oracle source databases on macOS, install yb-voyager using the Docker option.)
Hardware requirements
- Disk space of at least 1.5 times the estimated size of the source database
- 2 cores minimum (recommended)
Software requirement
- Java 17. Any higher versions of Java might lead to errors during installation or migration.
Prepare the host
The node where you'll run the yb-voyager command should:
- connect to both the source and the target database.
- have sudo access.
Install yb-voyager
YugabyteDB Voyager consists of the yb-voyager command line executable.
Install yb-voyager on a machine which satisfies the Prerequisites using one of the following options:
Perform the following steps to install yb-voyager using yum for RHEL 8 and CentOS 8:
-
Update the yum package manager, and all the packages and repositories installed on your machine using the following command:
sudo yum update
-
Install the
yugabyte
yum repository using the following command:sudo yum install https://s3.us-west-2.amazonaws.com/downloads.yugabyte.com/repos/reporpms/yb-yum-repo-1.1-0.noarch.rpm
This repository contains the yb-voyager rpm and other dependencies required to run
yb-voyager
. -
Install the
epel-release
repository using the following command:sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
-
Install the Oracle instant client repositories using the following command:
sudo yum install oracle-instant-clients-repo
-
Install the PostgreSQL repositories using the following command:
sudo yum --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
These repositories contain the rest of the dependencies required to run
yb-voyager
. -
Disable the default
PostgreSQL
yum module on your machine using the following command:sudo dnf -qy module disable postgresql
-
Install
perl-open
on your machine using the following command:sudo yum install perl-open.noarch
-
Update the yum package manager and all the packages and repositories installed on your machine using the following command:
sudo yum update
-
Install
yb-voyager
and its dependencies using the following command:sudo yum install yb-voyager
Install a specific version of
yb-voyager
on your machine using the following command:sudo yum install yb-voyager-<VERSION>
-
Check that yb-voyager is installed using the following command:
yb-voyager version
Upgrade yb-voyager
Upgrade yb-voyager using the following command:
sudo yum update yb-voyager
Perform the following steps to install yb-voyager using apt for Ubuntu:
Note
apt
installation is only supported for Ubuntu 22. For other versions such as 18 and 20, use the install script via the Source installation option.
-
Install the Yugabyte apt repository on your machine using the following command:
wget https://s3.us-west-2.amazonaws.com/downloads.yugabyte.com/repos/reporpms/yb-apt-repo_1.0.0_all.deb sudo apt-get install ./yb-apt-repo_1.0.0_all.deb
This repository contains the
yb-voyager
Debian package and the dependencies required to runyb-voyager
. -
Install the
postgresql-common
repository to fetch PostgreSQL 16 using the following commands:sudo apt install -y postgresql-common sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
-
Clean the
apt-get
cache and package lists using the following commands:sudo apt-get clean sudo apt-get update
-
Install yb-voyager and its dependencies using the following command:
sudo apt-get install yb-voyager
Note: If you see a failure in the install step similar to the following:
Depends: ora2pg (= 23.2-yb.2) but 24.3-1.pgdg22.04+1 is to be installed
Try installing ora2pg using the following command:
sudo apt-get install ora2pg=23.2-yb.2
Then try installing yb-voyager using the following command:
sudo apt-get install yb-voyager
-
Check that yb-voyager is installed using the following command:
yb-voyager version
Upgrade yb-voyager
Note
If you are upgrading Voyager from version 1.8.0 or earlier, you need to install the postgresql-common
repository before the upgrade as follows:
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
Upgrade yb-voyager using the following command:
sudo apt-get upgrade yb-voyager
Note on migrating from MySQL/Oracle on macOS
To migrate from MySQL/Oracle source databases on macOS to YugabyteDB, install yb-voyager using docker-based instructions.Perform the following steps to install yb-voyager using brew for macOS:
-
Tap the
yugabyte
Homebrew repository using the following command:brew tap yugabyte/tap
The repository contains the formula to build and install
yb-voyager
on your macOS device.Note that the tap
yugabyte/yugabytedb
has been updated toyugabyte/tap
. If you have previously installed yb-voyager using the tapyugabyte/yugabytedb
, untap the entry usingbrew untap yugabyte/yugabytedb
, and then tap using the preceding command. -
Install the
postgresql@16
package to accesspg_dump
orpg_restore
using the following command:brew install postgresql@16
-
Install
yb-voyager
and its dependencies using the following command:brew install yb-voyager
Install a specific version of
yb-voyager
using the following command:brew install yb-voyager@<VERSION>
-
Check that yb-voyager is installed using the following command:
yb-voyager version
You can perform an airgapped installation on Docker.
Install yb-voyager using a Docker image in an airgapped environment using the following steps:
-
From a machine connected to the internet, run the following commands to pull and save the latest yb-voyager docker image (Pull the version from docker.io):
docker pull yugabytedb/yb-voyager docker save -o yb-voyager-image.tar yugabytedb/yb-voyager:latest gzip yb-voyager-image.tar
-
Download the yb-voyager wrapper script on the same machine using the following command:
wget -O ./yb-voyager https://raw.githubusercontent.com/yugabyte/yb-voyager/main/docker/yb-voyager-docker
-
Copy the
yb-voyager-image.tar.gz
andyb-voyager
files to the airgapped machine. -
Load the docker image using the following command:
gunzip yb-voyager-image.tar.gz docker load --input yb-voyager-image.tar
-
Make the wrapper script executable and move it to the
bin
directory using the following commands:chmod +x yb-voyager sudo mv yb-voyager /usr/local/bin
-
Check that yb-voyager is installed using the following command:
yb-voyager version
You can perform an airgapped installation on RHEL 8 and CentOS 8.
-
Download the airgapped bundle:
https://s3.us-west-2.amazonaws.com/downloads.yugabyte.com/repos/airgapped/yb-voyager-latest-rhel-8-x86_64.tar.gz
-
Extract the bundle.
tar -xvf <tar-bundle-name>
It contains three packages - debezium, ora2pg, and yb-voyager.
-
Download the airgapped installation script into the extracted bundle directory:
wget -P </path/to/directory> raw.githubusercontent.com/yugabyte/yb-voyager/main/installer_scripts/install-voyager-airgapped.sh
-
Make the script executable:
chmod +x /path/to/directory/install-voyager-airgapped.sh
-
Transfer the folder (which contains the 3 packages and the installer script) to the airgapped machine.
-
Install all the dependencies on the airgapped machine.
-
Run the installer script on the airgapped machine to check the dependencies and install voyager:
./install-voyager-airgapped.sh
-
Check that yb-voyager is installed using the following command:
yb-voyager version
Dependencies for RHEL and CentOS 8
Binutils: Minimum version: 2.25
Java: Minimum version: 17
pg_dump: Minimum version: 14
pg_restore: Minimum version: 14
psql: Minimum version: 14
Yum packages
- gcc (no version dependency)
- make (no version dependency)
- sqlite (no version dependency)
- perl (no version dependency)
- perl-DBI (no version dependency)
- perl-App-cpanminus (no version dependency)
- perl-ExtUtils-MakeMaker (no version dependency)
- mysql-devel (no version dependency)
- oracle-instantclient-tools with exact version 21.5.0.0.0
- oracle-instantclient-basic with exact version 21.5.0.0.0
- oracle-instantclient-devel with exact version 21.5.0.0.0
- oracle-instantclient-jdbc with exact version 21.5.0.0.0
- oracle-instantclient-sqlplus with exact version 21.5.0.0.0
Installation Script
The script by default checks what dependencies are installed on the system and throws an error mentioning the missing dependencies. If all the dependencies are found to be installed, it proceeds with the installation of ora2pg, debezium, and yb-voyager.
Usage:
./install-voyager-airgapped.sh [options]
The options are as follows.
Argument | Description/valid options |
---|---|
-d, --check-only-dependencies | Check only dependencies and exit. |
-f, --force-install | Force install packages without checking dependencies. |
-h, --help | Display this help message. |
Oracle Instant Client installation help for Centos/RHEL
You can download the oracle instant client rpms from the following links:
You can perform an airgapped installation on Ubuntu 22 and later.
-
Download the airgapped bundle:
wget https://s3.us-west-2.amazonaws.com/downloads.yugabyte.com/repos/airgapped/yb-voyager-latest_debian.tar.gz
-
Extract the bundle.
tar -xvf <tar-bundle-name>
It contains three packages - debezium, ora2pg, and yb-voyager.
-
Download the airgapped installation script into the extracted bundle directory:
wget -P </path/to/directory> raw.githubusercontent.com/yugabyte/yb-voyager/main/installer_scripts/install-voyager-airgapped.sh
-
Make the script executable:
chmod +x /path/to/directory/install-voyager-airgapped.sh
-
Transfer the folder (which contains the 3 packages and the installer script) to the airgapped machine.
-
Install all the dependencies on the airgapped machine.
-
Run the install script on the airgapped machine to check the dependencies and install voyager:
./install-voyager-airgapped.sh
-
Check that yb-voyager is installed using the following command:
yb-voyager version
Dependencies for Ubuntu
Binutils: Minimum version: 2.25
Java: Minimum version: 17
pg_dump: Minimum version: 14
pg_restore: Minimum version: 14
psql: Minimum version: 14
APT packages
- gcc (no version dependency)
- sqlite3 (no version dependency)
- perl (no version dependency)
- libdbi-perl (no version dependency)
- libaio1 (no version dependency)
- cpanminus (no version dependency)
- libmysqlclient-dev (no version dependency)
- oracle-instantclient-tools with exact version 21.5.0.0.0
- oracle-instantclient-basic with exact version 21.5.0.0.0
- oracle-instantclient-devel with exact version 21.5.0.0.0
- oracle-instantclient-jdbc with exact version 21.5.0.0.0
- oracle-instantclient-sqlplus with exact version 21.5.0.0.0
Install script
The script by default checks what dependencies are installed on the system and throws an error mentioning the missing dependencies. If all the dependencies are found to be installed, it proceeds with the installation of ora2pg, debezium, and yb-voyager.
Usage:
./install-voyager-airgapped.sh [options]
The options are as follows.
Argument | Description/valid options |
---|---|
-d, --check-only-dependencies | Check only dependencies and exit. |
-f, --force-install | Force install packages without checking dependencies. |
-h, --help | Display this help message. |
Oracle Instant Client installation help for Ubuntu
You can download the oracle instant client RPM packages from the following links:
Before installing yb-voyager, ensure that you have the Docker runtime installed on your machine.
-
Pull the docker image from YugabyteDB's docker hub (Pull the version from docker.io) as follows:
docker pull yugabytedb/yb-voyager
-
Download the script to run yb-voyager using the docker image from yb-voyager's GitHub repository, and move it to your machine's bin directory using the following commands:
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
Use yb-voyager docker script withoutsudo
to run Voyager commands. To do this you need to reconfigure docker on your system to run without sudo. Refer to Manage Docker as a non-root user in the Docker documentation. -
Check that yb-voyager is installed using the following command:
yb-voyager version
Perform the following steps to install yb_voyager
using an installer script:
-
Clone the yb-voyager repository.
git clone https://github.com/yugabyte/yb-voyager.git
-
Change the directory to
yb-voyager/installer_scripts
.cd yb-voyager/installer_scripts
-
Install yb-voyager using the following script:
./install-yb-voyager
It is safe to execute the script multiple times. If the script fails, check the
/tmp/install-yb-voyager.log
file. -
The script generates a
.yb-voyager.rc
file in the home directory. Source the file to ensure that the environment variables are set using the following command:source ~/.yb-voyager.rc
-
Check that yb-voyager is installed using the following command:
yb-voyager version
Collect diagnostics
By default, yb-voyager captures a diagnostics report using the YugabyteDB diagnostics service that runs each time you use the yb-voyager command. If you don't want to send diagnostics when you run yb-voyager, set the --send-diagnostics flag to false.