This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ubuntu_upgrade_pg [2019/01/14 22:50] ian |
ubuntu_upgrade_pg [2020/02/13 22:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Upgrade of PostgreSQL and Ubuntu upgrade ====== | ||
+ | |||
+ | |||
1. Create a snapshot with XenServer | 1. Create a snapshot with XenServer | ||
Line 7: | Line 10: | ||
| | ||
</ | </ | ||
+ | postgresql | ||
< | < | ||
xenserver# xe vm-snapshot new-name-label=" | xenserver# xe vm-snapshot new-name-label=" | ||
Line 17: | Line 20: | ||
< | < | ||
# sudo sh -c 'echo "deb http:// | # sudo sh -c 'echo "deb http:// | ||
+ | |||
+ | # curl https:// | ||
# apt-get update | # apt-get update | ||
Line 34: | Line 39: | ||
< | < | ||
- | # sudo -u postgres pg_dropcluster 9.4 main | + | # sudo -u postgres pg_dropcluster |
</ | </ | ||
Line 40: | Line 45: | ||
< | < | ||
+ | # service postgresql stop | ||
+ | |||
# pg_upgradecluster -v 9.4 9.3 main | # pg_upgradecluster -v 9.4 9.3 main | ||
Disabling connections to the old cluster during upgrade... | Disabling connections to the old cluster during upgrade... | ||
Line 59: | Line 66: | ||
< | < | ||
- | # apt-get remove postgresql\*-9.3 | + | # apt-get remove postgresql |
</ | </ | ||
Line 65: | Line 72: | ||
# apt-get autoremove | # apt-get autoremove | ||
</ | </ | ||
+ | |||
+ | 7. Proceed with the Ubuntu upgrade | ||
+ | |||
+ | < | ||
+ | # apt-get dist-upgrade | ||
+ | |||
+ | # do-release-upgrade | ||
+ | </ | ||
+ | |||
+ | And restore the PGDG repo | ||
+ | |||
+ | < | ||
+ | # sudo sh -c 'echo "deb http:// | ||
+ | |||
+ | # apt update | ||
+ | |||
+ | # apt full-upgrade | ||
+ | </ | ||
+ | |||