pg_upgrade
Upgrade a PostgreSQL database cluster to a new major version. tldr-pages
On several platforms
Several platforms
Check clusters before upgrading
pg_upgrade --check --old-bindir path/to/old_bin --new-bindir path/to/new_bin --old-datadir path/to/old_data --new-datadir path/to/new_dataIdentifyPerform the actual upgrade
pg_upgrade --old-bindir path/to/old_bin --new-bindir path/to/new_bin --old-datadir path/to/old_data --new-datadir path/to/new_dataIdentifyUse multiple parallel jobs during the upgrade
pg_upgrade --jobs njobs --old-bindir path/to/old_bin --new-bindir path/to/new_bin --old-datadir path/to/old_data --new-datadir path/to/new_dataIdentifySpecify the old and new PostgreSQL ports
pg_upgrade --old-port port --new-port port --old-bindir path/to/old_bin --new-bindir path/to/new_bin --old-datadir path/to/old_data --new-datadir path/to/new_dataIdentifyUse hard links instead of copying files to the new cluster
pg_upgrade --link --old-bindir path/to/old_bin --new-bindir path/to/new_bin --old-datadir path/to/old_data --new-datadir path/to/new_dataIdentifyDisplay help
pg_upgrade --helpIdentify