Thread: Restore a PG database in Windows

Restore a PG database in Windows

From
"josh@segrestfarms.com"
Date:
I am having an extremely difficult time restoring the backup.gz I have
on my Desktop.

I just completed my installation of PG 8 on my Windows XP Home
notebook.  I tried using PGAdminIII to do the Restore, but for some
reason it doesn't want to work.

So, I tried using PSQL, but I'm still not having any luck.

Can anyone direct me to a good resource that explains how to go about
restoring a database on a Windows box?

Thanks in advance!!


Josh in Tampa

Re: Restore a PG database in Windows

From
Andreas Kretschmer
Date:
josh@segrestfarms.com <josh@segrestfarms.com> schrieb:

> I am having an extremely difficult time restoring the backup.gz I have on
> my Desktop.

How is this backup.gz created?


> So, I tried using PSQL, but I'm still not having any luck.
>
> Can anyone direct me to a good resource that explains how to go about
> restoring a database on a Windows box?

Can you unzip the backup.gz and is this then plain ascii with plain sql?
If so, than you can call 'psql dbname < backup' (the unzipped file).

Sorry, i'm a linux-user, but i think, this should work under windows
too.

http://www.postgresql.org/docs/current/static/backup.html


HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°