You must install WarehousePG (WHPG) Copy on each host in your source and destination WarehousePG clusters. Optionally, you can also install and run the utility from a separate host, as long as it has access to both the source and destination WHPG coordinators.
Downloading and installing the utility
On both source and destination coordinators, download the package from the EDB repository:
export EDB_SUBSCRIPTION_TOKEN=<your-token> export EDB_REPO=gpsupp curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_REPO/setup.rpm.sh" | sudo -E bash sudo dnf download edb-whpg-copy
export EDB_SUBSCRIPTION_TOKEN=<your-token> export EDB_REPO=gpsupp curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_REPO/setup.rpm.sh" | sudo -E bash sudo yumdownloader edb-whpg-copy
On both source and destination coordinators, create a file
all_hostswhich lists all hosts in each WHPG cluster. For example:cdw scdw sdw1 sdw2 sdw3
From each coordinator, use the
gpsyncutility to transfer the package to all hosts in the cluster and then use use thegpsshutility to install the package:gpsync -f all_hosts <whpg-copy-package-name> =:/tmp gpssh -f all_hosts -e 'sudo dnf install -y /tmp/<whpg-copy-package-name>'
Where
<whpg-copy-package-name>is the name of the WarehousePG Copy package file you downloaded.gpsync -f all_hosts <whpg-copy-package-name> =:/tmp gpssh -f all_hosts -e 'sudo yum install -y /tmp/<whpg-copy-package-name>'
Where
<whpg-copy-package-name>is the name of the WarehousePG Copy package file you downloaded.
Upgrading
Upgrade whpg-copy on every host in both the source and destination clusters. Every host across both clusters must run the same version, because the statistics format used during a copy can change between releases, and mismatched versions can't exchange them. whpg-copy reads its settings fresh from the command line or a TOML file on each run rather than storing them, so there's no configuration to migrate. Avoid upgrading while a copy is in progress.
On both source and destination coordinators, download the new package version from the EDB repository:
export EDB_SUBSCRIPTION_TOKEN=<your-token> export EDB_REPO=gpsupp curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_REPO/setup.rpm.sh" | sudo -E bash sudo dnf download edb-whpg-copy
export EDB_SUBSCRIPTION_TOKEN=<your-token> export EDB_REPO=gpsupp curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_REPO/setup.rpm.sh" | sudo -E bash sudo yumdownloader edb-whpg-copy
From each coordinator, use the
gpsyncutility to transfer the new package to all hosts in the cluster, then use thegpsshutility to upgrade it:gpsync -f all_hosts <whpg-copy-package-name> =:/tmp gpssh -f all_hosts -e 'sudo dnf upgrade -y /tmp/<whpg-copy-package-name>'
Where
<whpg-copy-package-name>is the name of the new WarehousePG Copy package file you downloaded.gpsync -f all_hosts <whpg-copy-package-name> =:/tmp gpssh -f all_hosts -e 'sudo yum upgrade -y /tmp/<whpg-copy-package-name>'
Where
<whpg-copy-package-name>is the name of the new WarehousePG Copy package file you downloaded.Verify the upgrade by checking the
whpg-copyversion on each host:whpg-copy version