Re: Upgrading postgresql -- how to dump databases?
On Tue, Jun 05, 2001 at 09:52:07PM -0500, Debian User wrote:
> Okay... so I've upgraded from stable to unstable, and everything seems to be
> working fine... except postgresql. When upgrading, I got a message telling
> me to dump my databases and convert them to the new format. Since I didn't
> have any databases at the time, I didn't think much of it. Now, however,
> when I try to start postmaster, it says it can't find the data directory.
> Are there databases that I'm missing? Did it even get upgraded?
PostgreSQL databases typically live in /var/lib/postgres/data, but you
can put them anywhere where the "user" postgres has exclusive Read/Write
permission and ownership (typically the $HOME for the postgres user is
/var/lib/postgres -- so make sure that exists and has permissions:
drwxr-x-r-x postgres postgres )
Now, "su" to root, then "su" to "postgres" then run "initdb -D
/var/lib/postgres/data". Then you should be all set to start postgresql
via "/etc/init.d/postgresql start". See "man initdb" for more info.
Also, see /etc/postgresql/ for configuration files...
If you previously had postgresql installed, but never used it, you can
just delete any previous /var/lib/postgres/data, if it exists.
PostgreSQL will refuse to run if the format of the database(s) in
/var/lib/postgres/data is too old.
--
Eric G. Miller <egm2@jps.net>
Reply to: