Create a database user and provide the user with READ access to all the resources which need to be migrated. Run the following commands in a psql
session:
-
Create a new user named
ybvoyager
.CREATE USER ybvoyager PASSWORD 'password';
-
Grant permissions for migration. Use the
yb-voyager-pg-grant-migration-permissions.sql
script (in/opt/yb-voyager/guardrails-scripts/
or, for brew, check in$(brew --cellar)/yb-voyager@<voyagerversion>/<voyagerversion>
) to grant the required permissions as follows:psql -h <host> \ -d <database> \ -U <username> \ # A superuser or a privileged user with enough permissions to grant privileges -v voyager_user='ybvoyager' \ -v schema_list='<comma_separated_schema_list>' \ -v is_live_migration=0 \ -v is_live_migration_fall_back=0 \ -f <path_to_the_script>
The
ybvoyager
user can now be used for migration.
If you want yb-voyager to connect to the source database over SSL, refer to SSL Connectivity.