The gpupgrade revert
command restores the source cluster to its original state before you started the upgrade. You may revert the upgrade at any time after gpupgrade initialize
, or after gpupgrade execute
, even if there is an error. However, you do not need to revert the upgrade due to an error during gpupgrade initialize
or gpupgrade execute
. You can simply fix the reported problems and re-run the command.
gpupgrade revert
cannot restore the source cluster after you run gpupgrade finalize
. To recover the source cluster after gpupgrade finalize
, restore from a backup.
ImportantOnly revert the upgrade during a scheduled downtime. Users should receive sufficient notice that the Greenplum Database cluster will be offline for an extended period.
Reverting the upgrade after running gpupgrade initialize
completes quickly, since the source cluster has not been altered. If reverting the upgrade after running gpupgrade execute
, once the primary segments are upgraded, the reverting speed depends on the upgrade mode:
copy
mode, reverting the upgrade is fast, since the utility simply removes the target cluster primary data directories.link
mode, reverting the upgrade is slow, since the utility uses rsync
to re-create the source cluster primary segments from the mirrors.NoteIf you used
link
mode, you must have segment mirroring enabled and a standby master in your cluster in order to rungpupgrade revert
aftergpupgrade execute
. Otherwise, the command exits with an error message.
The gpupgrade revert
command performs the following substeps to restore the cluster to its original state:
Run the following command to revert the upgrade process:
gpupgrade revert --verbose
The utility displays a summary message and waits for user confirmation before proceeding. Then it proceeds to run the different steps and displays its progress on the screen:
Checking active connections on target cluster... [COMPLETE]
Stopping target cluster... [COMPLETE]
...
The utility prompts to run the Revert data migration SQL scripts, if applicable. It displays all the scripts that it needs to apply, along with an explanation of what they do. The tool provides several options: none, some and all. Apply the provided scripts to get any database objects that were modified or dropped during gpupgrade initialize
back to their original state.
Once gpupgrade revert
completes, the source Greenplum cluster is running, and the target Greenplum cluster, and all files and directories gpupgrade initialize
created are removed. The configuration file you used with gpupgrade initialize
is untouched, and the log files for all gpupgrade
commands you ran are archived in the $HOME/gpAdminLogs/gpupgrade
directory by renaming the directory with a timestamp, in the format $HOME/gpAdminLogs/gpupgrade-<upgradeID>-<timestamp>
.
Once the gpupgrade revert
command has completed successfully, undo any manual changes in the source cluster that you performed in preparation for the upgrade process. Recreate any dropped database objects, and reinstall any database extensions or libraries you uninstalled. Using the cluster without restoring these changes can lead to degraded performance and possible application failures.