From: jehan-free <jehan.procaccia@free.fr>
To: Martin Fandel <martin.fandel@alphyra-evs.de>
Cc: pgsql-admin@postgresql.org
Cc: Lydie.Soler@inapg.inra.fr
Subject: Re: restore database from bare files
Date: Thu, 30 Jun 2005 19:57:52 +0200
Message-ID: <42C432A0.1020407@free.fr> (raw)
In-Reply-To: <1120128109.18693.43.camel@fandelm.ecommit.de>
References: <MHEDJHCKDNOEHJKHIOCJIECKCEAA.dario_d_s@unitech.com.ar>
<1120128109.18693.43.camel@fandelm.ecommit.de>
very good, that worked fine :-)
I restored the files from tar, started a postgresql 7.3 on an old redhat
9 ! pg_dump my database, psql it back to my postgresql 7.4 on my
production RHEL4 server .
still a small pb, I seem to have lost authentification. (although
pg_hba.conf was restore also)
$ psql -h meta1 -U ezpublish -d ezpublish_db
psql: FATAL: user "ezpublish" does not exist
if I go with:
$ psql -h meta1 -U postgres -d ezpublish_db
Welcome to psql 7.4.8, the PostgreSQL interactive terminal.
that works , then I go for setting a user + password:
ezpublish_db-# ALTER USER ezpublish SET PASSWORD secret;
ERROR: syntax error at or near "$" at character 1
what's wrong ?
note that for that ezpublisher database I had initily integrated from
postgresql-contribs those functions:
$psql ezpublish_db < /usr/share/pgsql/contrib/pgcrypto.sql
don't know if my problem is related to that ?
Thanks again.
Martin Fandel wrote:
>Hi,
>
>try this:
>psql -t -d yourdb -c "SELECT datid FROM pg_stat_database WHERE
>datname='yourdb';"
>
>http://www.postgresql.org/docs/8.0/static/monitoring-stats.html
>
>Greetings,
>
>Martin
>
>Am Donnerstag, den 30.06.2005, 12:57 +0200 schrieb jehan-free:
>
>
>>OK, I'am not yet at restarting postgres .. but if at get pb then I check
>>that , thanks !
>>For now , How can I tell from the bare file the mapping between a
>>database name and the number appearing in /var/lib/pgsql/base directory
>>I have :
>>pgsql/data/base/1/
>>pgsql/data/base/16975/
>>pgsql/data/base/16980/
>>so I made the assumption that 1 is a database (probably the test initial
>>database ?), 16975 is an other one and 16980 a tird one ! How can I find
>>the map from these numbers to database name ?
>>thanks
>>Martin Fandel wrote:
>>
>>
>>
>>>Hi
>>>
>>>Maybe you must reset the WAL's
>>>( http://www.postgresql.org/docs/7.3/interactive/app-pgresetxlog.html )
>>>after restoring from tarball if postgres doesn't start.
>>>
>>>Am Donnerstag, den 30.06.2005, 07:34 +0200 schrieb jehan:
>>>
>>>
>>>
>>>
>>>>So I must one way or another run a 7.3, restore the file from the
>>>>tarball as is (just put them back to /var/lib/pgsql), the databases
>>>>should be running correctly then (?), then pg_dump it , upgrade to 7.4
>>>>and restore from the pg_dump .
>>>>before running in all this (and I still don't know how I will be able to
>>>>get a 7.3 on RHEL4 ... ?) is that the correct procedure ?
>>>>thanks
>>>>
>>>>
>>>>
>>>>
>>>yes, this is the correct way :).
>>>
>>>Martin
>>>
>>>
>>>---------------------------(end of broadcast)---------------------------
>>>TIP 9: In versions below 8.0, the planner will ignore your desire to
>>> choose an index scan if your joining column's datatypes do not
>>> match
>>>
>>>
>>>
>>>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jehan.procaccia@free.fr, martin.fandel@alphyra-evs.de, Lydie.Soler@inapg.inra.fr
Subject: Re: restore database from bare files
In-Reply-To: <42C432A0.1020407@free.fr>
References: <MHEDJHCKDNOEHJKHIOCJIECKCEAA.dario_d_s@unitech.com.ar> <1120128109.18693.43.camel@fandelm.ecommit.de> <42C432A0.1020407@free.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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