Set variables
This is the critical part of the script. To declare correct variables for source (old server) and target (new server).
1. Set Variables in the script
// Declare variables
var (
pg_admin_path = "/Applications/pgAdmin4.app/Contents/SharedSupport/"
pg_dump = pg_admin_path + "pg_dump"
pg_restore = pg_admin_path + "pg_restore"
pg_psql = pg_admin_path + "psql"
source_ip = "94.237.x.1"
source_db = "tenant1"
source_usr = "t1"
source_pw = "password"
target_ip = "94.237.x.2"
target_db = "tenant2"
target_usr = "t2"
target_pw = "password"
postgres_pw = "super_password"
)