Upgrade postgresql-8.4 to postgresql-9.1 on debian
source link: https://www.devroom.io/2011/11/22/upgrade-postgresql-8-4-to-postgresql-9-1-on-debian/?utm_campaign=Feed%3A+ariejan+%28ariejan%7Cdevroom.io%29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Upgrade postgresql-8.4 to postgresql-9.1 on debian
Posted:
2011-11-22
- Last updated:
2019-06-05
Tagged ubuntu debian dba postgres postgresql
Today I upgraded a production PostgreSQL 8.4 database to version 9.1. This was on a Debian server. ~ The first step is to make a full dump of your data. I personally like to store that dump somewhere safe before upgrading. As root:
su - postgres
pg_dumpall > dump.sql
exit
cp ~postgres/dump.sql /root/
Now you can safely remove the postgresql-8.4 and install postgresql-9.1:
aptitude purge postgresql-8.4
aptitude install postgresql-9.1
Next check the postgresql configuration in /etc/postgresql/9.1/main
. If you make any changes, make sure to restart postgres with /etc/init.d/postgresql restart
.
Postgresql 9.1 is now up and running, let’s import our data back into it.
su - postgres
psql < dump.sql
That’s all. You’re now fully upgraded to PostgreSQL 9.1.
My site is free of ads and trackers. I record privacy-respecting usage statistics with Fathom.
Was this post helpful to you? Why not ☕ Buy me a coffee
Copyright © 1999-2020 Ariejan de Vroom <[email protected]>
Live now; make now always the most precious time. Now will never come again.
– Jean-Luc Picard
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK