Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
27
rated 0 times [  27] [ 0]  / answers: 1 / hits: 29616  / 2 Years ago, sat, september 3, 2022, 2:43:17

I have upgraded my ubuntu development machine from 11.04 to 11.10.
In the process my postgres was also upgraded from 8.4 to 9.1.



But I seem to have lost all my data. If I look, I can see that my data for 8.4 is in folder /var/lib/postgres/8.4/main and my new database is in /var/lib/postgres/9.1/main.



What is the best way to migrate my data to the new version? Can I just copy the files?


More From » postgresql

 Answers
2
su postgres
pg_dropcluster --stop 9.1 main
pg_upgradecluster 8.4 main


At first this did not work for me for two reasons. Firstly, postgresql-8.4 had been unistalled at some point, so I had to reinstall it:



sudo apt-get install postgresql-8.4


Then I had to go into the 8.4 postgresql.conf and change max_connections to 10. Then it worked. You should be able to find the conf file at /etc/postgresql/8.4/main/postgresql.conf


[#43035] Sunday, September 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rofity

Total Points: 182
Total Questions: 98
Total Answers: 115

Location: Albania
Member since Sat, Jan 7, 2023
1 Year ago
;