PDA

View Full Version : If I backup 8.2 DB can I restore once on 8.3?



originaL
08-28-2008, 04:15 PM
I recently bought a new portable external HD so I can play using 1 database on 2 laptops.

I'm currently running 8.2 on my original laptop, but I'm going to backup my database and remove 8.2. At that point I will instal 8.3 on both laptops and restore the database(s).

I'll follow the FAQ found here (http://208.109.95.123/faq/afmmain.aspx?faqid=154) to enable my database on 2 laptops.


cliffs: currently on one laptop using 8.2 - would like to go to two laptops running 8.3 (please correct any mistake before I make it)

fabio
08-28-2008, 05:34 PM
Please try this:

get to the command prompt and go to the c:\program files\postgresql\8.x\bin folder and run pg_dumpall -U postgres > c:\dbbackup.sql

This may take a while but the end result will be that your entire postgres database will be backed up to a file. If you want it saved to a different folder just change that c:\dbbackup.sql to something more fitting. Then on the new postgres folder get to the same folder in cmd and type

psql -U postgres -f c:\dbbackup.sql postgres (or change the filename to whatever makes sense)

This should safely backup and restore between versions

originaL
08-28-2008, 08:49 PM
Do any of these paths change if I'm using an external HD (E: ) to store my data files?

fabio
08-29-2008, 05:17 AM
Yes:

c:\program files\postgresql\8.x\bin folder and run pg_dumpall -U postgres > E:\dbbackup.sql

psql -U postgres -f E:\dbbackup.sql postgres

originaL
08-29-2008, 03:21 PM
I got a message that was something like "postgres already exists" but then it just continued the process. Now I have all kinds of lines in the command prompt saying "ALTER TABLE" over and over again.

Is this standard?

fabio
09-01-2008, 06:16 AM
Have you created any databases after your refresh install?