1. Dump a backup to disk, then restore from dump on new version;
2. Stop the old version, then run `pg_upgrade --link` on the data of the old version which should create a new data directory using hardlinks, then start the new version using the new data directory. This is rather quick; or
3. Use Logical Replication to stand up the new version. This has ... a few caveats.
You do a backup on the old version and a restore on the new one.
From what I understood, sometimes the way data is written to disk differently between versions and they're not compatible. I guess due to optimizations or changes in the storage engine?
1. Dump a backup to disk, then restore from dump on new version;
2. Stop the old version, then run `pg_upgrade --link` on the data of the old version which should create a new data directory using hardlinks, then start the new version using the new data directory. This is rather quick; or
3. Use Logical Replication to stand up the new version. This has ... a few caveats.