Last active
February 4, 2022 20:54
-
-
Save edib/db1bf3a28c1a88bd9d4800a8adb844c3 to your computer and use it in GitHub Desktop.
Upgrade postgres 9.5 to 11 with pg_upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian for more information and warning! | |
# Check first | |
/usr/lib/postgresql/11/bin/pg_upgrade \ | |
-b /usr/lib/postgresql/9.6/bin \ | |
-B /usr/lib/postgresql/11/bin \ | |
-d /var/lib/postgresql/9.6/main \ | |
-D /var/lib/postgresql/11/main \ | |
-o ' -c config_file=/etc/postgresql/9.6/main/postgresql.conf' \ | |
-O ' -c config_file=/etc/postgresql/11/main/postgresql.conf' \ | |
-c | |
# Upgrade with hardlink | |
/usr/lib/postgresql/11/bin/pg_upgrade \ | |
-b /usr/lib/postgresql/9.6/bin \ | |
-B /usr/lib/postgresql/11/bin \ | |
-d /var/lib/postgresql/9.6/main \ | |
-D /var/lib/postgresql/11/main \ | |
-o ' -c config_file=/etc/postgresql/9.6/main/postgresql.conf' \ | |
-O ' -c config_file=/etc/postgresql/11/main/postgresql.conf' \ | |
-k |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment