Re: Postrgres data restoration problem (which NG to post to?)
From: Roger Leigh (${roger}_at_invalid.whinlatter.uklinux.net.invalid)
Date: 11/26/03
- Previous message: Ken Sodemann: "Re: passing multiple parameters to gtk_signal_connect"
- In reply to: Jim Cochrane: "Postrgres data restoration problem (which NG to post to?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 Nov 2003 20:49:45 +0000
Jim Cochrane <jtc@shell.dimensional.com> writes:
> I'm looking for help restoring old postgres databases on a linux system
> after a reinstall of Redhat (including posgresql). It's the same version
> of postgres I was using before the resinstall, but I've not been able to
> get the database server to see the old databases.
>
> My main question for now is: What is the best group to post this question
> in? I could not find a postgres group, nor a linux database group.
> Once I know what group to post in I'll include more details about the
> problem.
There are a whole set of postgresql mailing lists.
http://www.postgresql.org. There are also some USENET mail<->news
gateways, but they didn't work for me--perhaps the USENET side is
read-only?
For a linux group, comp.os.linux.misc might be a better choice.
I'd also recommend a copy of the O'Reilly "Practical PostgreSQL" book.
> And - apologies - since this is probably not the right group. (However,
> I'm posting here because I suspect that readers of this group would have
> a good answer as to where to post.)
Well, there are a few Postgres users lurking here!
Firstly, what format is the backup in: is it a copy of the database
cluster, or a proper dump as done with pg_dump?
If the former, you need to copy the whole lot into
/var/lib/postgres/data (or wherever the database lives on your
system), and restart the postmaster. Hopefully everything will
magically be there.
For the latter, create a new empty database cluster with initdb.
Then, use psql to connect to template1, then restore the backup as
follows:
use CREATE DATABASE to create a new database (or use createdb).
use \c to connect to it.
use \i backup.sql to restore the backup data from "backup.sql".
Read the first few lines of the backup file to see what SQL it will
execute, which will tell you whether it requires the database creating
in advance (IIRC older versions might do this for you, but it's not
always helpful).
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
- Previous message: Ken Sodemann: "Re: passing multiple parameters to gtk_signal_connect"
- In reply to: Jim Cochrane: "Postrgres data restoration problem (which NG to post to?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|