pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedupgrading, but learned about pg_dumpall too late
4+ messages / 3 participants
[nested] [flat]
* upgrading, but learned about pg_dumpall too late
@ 2010-02-20 21:26 Richard O. Hammer <rhammer@FastMail.fm>
0 siblings, 1 reply; 4+ messages in thread
From: Richard O. Hammer @ 2010-02-20 21:26 UTC (permalink / raw)
To: pgsql-admin
Hello,
I hope someone can tell me how to recover my database tables. I recently
upgraded to a new Linux server. First I saved a copy of my
/var/lib/pgsql/data/*, which was created with PG version 7.4. On the new Linux
server I have PG version 8.1.11.
But now, trying use my old tables, I discover that I should have saved the
tables with the pg_dumpall command before I abandoned the version-7.4 Postgres
server. Unfortunately I did not know about pg_dumpall.
So now I'm wondering if there is a way I can read and update my version-7.4 data
directory with my version-8.1 postmaster.
Here is one thing I've tried:
bash-3.2$ pg_ctl start -D /var/lib/pgsql/old/data
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 7.4, which
is not compatible with this version 8.1.1
Any suggestions will be appreciated.
Thank you,
Rich Hammer
Hillsborough, N.C.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upgrading, but learned about pg_dumpall too late
@ 2010-02-20 22:42 Andrzej Zawadzki <zawadaa@gmail.com>
parent: Richard O. Hammer <rhammer@FastMail.fm>
0 siblings, 1 reply; 4+ messages in thread
From: Andrzej Zawadzki @ 2010-02-20 22:42 UTC (permalink / raw)
To: pgsql-admin
On 20.02.2010 22:26, Richard O. Hammer wrote:
> Hello,
>
Hi!
> I hope someone can tell me how to recover my database tables. I
> recently upgraded to a new Linux server. First I saved a copy of my
> /var/lib/pgsql/data/*, which was created with PG version 7.4. On the
> new Linux server I have PG version 8.1.11.
>
> But now, trying use my old tables, I discover that I should have saved
> the tables with the pg_dumpall command before I abandoned the
> version-7.4 Postgres server. Unfortunately I did not know about
> pg_dumpall.
>
> So now I'm wondering if there is a way I can read and update my
> version-7.4 data directory with my version-8.1 postmaster.
>
> Here is one thing I've tried:
> bash-3.2$ pg_ctl start -D /var/lib/pgsql/old/data
> FATAL: database files are incompatible with server
> DETAIL: The data directory was initialized by PostgreSQL version
> 7.4, which is not compatible with this version 8.1.1
>
> Any suggestions will be appreciated.
>
Downgrade to 7.4
Dump
Upgrade
Restore
--
Andrzej Zawadzki
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upgrading, but learned about pg_dumpall too late
@ 2010-02-20 23:22 Greg Stark <gsstark@mit.edu>
parent: Andrzej Zawadzki <zawadaa@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Greg Stark @ 2010-02-20 23:22 UTC (permalink / raw)
To: Andrzej Zawadzki <zawadaa@gmail.com>; +Cc: pgsql-admin
On Sat, Feb 20, 2010 at 10:42 PM, Andrzej Zawadzki <zawadaa@gmail.com> wrote:
> Downgrade to 7.4
> Dump
> Upgrade
> Restore
>
Actually that's not the best way.
The best way is to install 7.4 and 8.1.19 (not 8.1.11 which has known
bugs) at the same time.
Use the pg_dump *from* *8.1.19* to connect to the 7.4 server and dump
the database.
Then shut down 7.4 and start up 8.1.19 and use pg_restore to restore
the database.
--
greg
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: upgrading, but learned about pg_dumpall too late
@ 2010-02-21 19:20 Andrzej Zawadzki <zawadaa@gmail.com>
parent: Greg Stark <gsstark@mit.edu>
0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Zawadzki @ 2010-02-21 19:20 UTC (permalink / raw)
To: pgsql-admin
On 21.02.2010 00:22, Greg Stark wrote:
> On Sat, Feb 20, 2010 at 10:42 PM, Andrzej Zawadzki <zawadaa@gmail.com> wrote:
>
>> Downgrade to 7.4
>> Dump
>> Upgrade
>> Restore
>>
>>
> Actually that's not the best way.
>
>
True bat not easier for beginner ;-)
> The best way is to install 7.4 and 8.1.19 (not 8.1.11 which has known
> bugs) at the same time.
>
> Use the pg_dump *from* *8.1.19* to connect to the 7.4 server and dump
> the database.
> Then shut down 7.4 and start up 8.1.19 and use pg_restore to restore
> the database.
>
BTW. Isn't better make static (?) (stand alone) build of pg_dump(all)?
Postgresql engine could be 7.1 and pg_dump will in 8.1 version.
Much easier to upgrade on one machine.
--
Andrzej Zawadzki
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2010-02-21 19:20 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-02-20 21:26 upgrading, but learned about pg_dumpall too late Richard O. Hammer <rhammer@FastMail.fm>
2010-02-20 22:42 ` Andrzej Zawadzki <zawadaa@gmail.com>
2010-02-20 23:22 ` Greg Stark <gsstark@mit.edu>
2010-02-21 19:20 ` Andrzej Zawadzki <zawadaa@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox