This topic contains steps to get you quickly up and running with the
See also the section About Log Files for details about logging in the upgrade process.
Install the Latest Greenplum 6X Version on All Hosts
Copy the Greenplum 6 package to the
/tmp directory on all hosts:
$ gpscp -f all_hosts greenplum-db-6*rpm =:/tmp
Install the Greenplum 6 package on all hosts:
$ gpssh -f all_hosts -v -e 'sudo yum install -y /tmp/greenplum-db-6*rpm'
Install the gpupgrade Package on All Hosts
gpupgrade package from VMware Tanzu Network and copy it to the /tmp directory on all hosts:
$ gpscp -f all_hosts gpupgrade*.rpm =:/tmp
gpupgrade package on all hosts:
$ gpssh -f all_hosts -v -e 'sudo yum install -y /tmp/gpupgrade*rpm'
Generate Data Migration Scripts
Since some objects are not upgradeable, data migration scripts can help upgrade them – for example, by altering them to a compatible type, or by dropping and recreating them.
$ gpupgrade-migration-sql-generator.bash $GPHOME $PGPORT $HOME/gpupgrade
Run Pre-Initialize Data Migration Scripts
$ gpupgrade-migration-sql-executor.bash $GPHOME $PGPORT $HOME/gpupgrade/pre-initialize
NOTE: See Prepare the Source Cluster for additional steps to take before starting the initialize phase.
Copy the example config file to
$HOME/gpupgrade/ and update the required parameters
source_master_port, and – if upgrading with extensions whose install location is not in
target_gphome – the
$ cp /usr/local/bin/greenplum/gpupgrade/gpupgrade_config $HOME/gpupgrade/
$ gpupgrade initialize --verbose --file $HOME/gpupgrade/gpupgrade_config
See the gpupgrade Initialize Phase topic for more information on updating the configuration file.
NOTE: If you are upgrading with extensions, the initialize command will fail during the
pg_upgrade checks phase, as the extensions are not yet installed in the target cluster. You must follow a few extra steps and then issue the
initialize command again. See Running gpupgrade Initialize for further details.
Run revert (Optional)
Reverting returns the cluster to its original state. This stops the upgrade, removes any upgrade artifacts, and restores the source cluster. It can only be used after initialize and execute, and is “not” allowed during finalize.
$ gpupgrade revert --verbose
To restore any non-upgradeable objects run the “post-revert” data migration scripts:
$ gpupgrade-migration-sql-executor.bash $GPHOME $PGPORT $HOME/gpupgrade/post-revert
gpupgrade revert fails, you may revert the cluster manually with the following command:
$ gpssh -f all_hosts -v -e 'rm -rf $HOME/.gpupgrade && gpupgrade kill-services && pkill gpupgrade'
$ gpupgrade execute --verbose
$ gpupgrade finalize --verbose
Update the GPDB symlink
$ gpssh -f all_hosts -v -e 'sudo rm /usr/local/greenplum-db && sudo ln -s /usr/local/greenplum-db-6* /usr/local/greenplum-db'
Start the Target Cluster
In a new shell:
$ source /usr/local/greenplum-db-6*/greenplum_path.sh $ gpstart -a
NOTE: See the Post-upgrade topic for additional steps to take after you complete finalize.
Run Post-Finalize Data Migration Scripts
$ gpupgrade-migration-sql-executor.bash $GPHOME $PGPORT $HOME/gpupgrade/post-finalize
Where to find log files:
gpupgrade logs are located on each host in
pg_upgrade logs are in the subdirectory
gpupgrade calls Greenplum utilities such as
gpstop – these utilities’ logs are located in
$HOME/gpAdminLogs on each host.
The source cluster’s
pg_log files are located in
The target cluster’s
pg_log files are located in
$(gpupgrade config show --target-datadir)/pg_log.
Once finalize has completed, the
$HOME/gpAdminLogs/gpupgrade directory is archived with the upgradeID and timestamp.