After updating 11.04 to 11.10 using 'do-release-upgrade', installer did not updated PostgreSQL 8.4 to 9 version, saying that i have to do it manually. But how? I heard many problems, for example data loss, or dissapered config files after updating manually from 8.4 to 9 in Ubuntu. Sow how to update, to avoid data damage or other problems? Thanks.
Asked
Active
Viewed 6,583 times
1
-
See this duplicate: http://askubuntu.com/questions/66194/how-do-i-migrate-my-postgres-data-from-8-4-to-9-1 – nh2 Sep 24 '12 at 02:40
1 Answers
4
Start by making a backup of your database, worse case scenerio I would hope you could re-install 11.04 and restore postgresql from backup. You may need to re-install postgresql 8.4 first.
Stop postgresql and any services that use it (apache ?)
su - postgres
pg_dumpall >backup_db
exit
Save a copy of backup_db
to 2 safe locations, /root and a flash drive.
Now purge 8.4 and install 9.0
apt-get purge postgresql-8.4
apt-get install postgresql-9.0
Now restore your data
su - postgres
psql <backup_db
exit
Restart postgresql and your other services, check your data.
Good luck =)

Panther
- 102,067
-
-
http://dba.stackexchange.com/questions/17740/how-to-get-a-working-and-complete-postgresql-db-backup-and-test – Donato Apr 23 '15 at 06:04