The following sections describe the prerequisites for installing YugabyteDB Voyager.
You can install YugabyteDB Voyager on the following:
- CentOS 7
- Ubuntu 18.04, 20.04
- MacOS (currently supported only for PostgreSQL source database)
- Disk space must be at least 1.5 times the estimated size of the source database.
- 2 cores minimum (recommended)
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.
Create an export directory
Before starting migration, you should create the export directory on a file system that has enough space to keep the entire data dump. Next, you should provide the path of the export directory as a mandatory argument (
--export-dir) to each invocation of the yb-voyager command.
yb-voyager uses the directory to store source data, schema files, and the migration state. The file system in which the directory resides must have enough free space to hold the entire source database. Create an export directory in the local file system on the machine where YugabyteDB Voyager will be installed, and place its path in an environment variable.
mkdir $HOME/export-dir export EXPORT_DIR=$HOME/export-dir
The export directory has the following sub-directories and files:
reportsdirectory contains the generated Schema Analysis Report
schemadirectory contains the source database schema translated to PostgreSQL. The schema is partitioned into smaller files by the schema object type such as tables, views, and so on.
datadirectory contains TSV (Tab Separated Values) files that are passed to the COPY command on the target database.
tempdirectories are used by yb-voyager for internal bookkeeping.
yb-voyager.logcontains log messages.
YugabyteDB Voyager consists of the yb-voyager command line executable. yb-voyager keeps all of its migration state, including exported schema and data, in a local directory called the export directory.
To install yb-voyager on a machine which satisfies the Prerequisites, do the following:
- Clone the yb-voyager repository.
git clone https://github.com/yugabyte/yb-voyager.git
- Change the directory to
- Install yb-voyager using the following script:
It is safe to execute the script multiple times. If the script fails, check the
- The script generates a
.yb-voyager.rcfile in the home directory. Source the file to ensure that the environment variables are set using the following command:
- Check that yb-voyager is installed using the following command:
To learn more about yb-voyager, refer to YugabyteDB Voyager CLI.