Moving the data directory - Mailing list pgsql-admin

From Sairam Krishnamurthy
Subject Moving the data directory
Date
Msg-id AANLkTik0FbNw2RC=3dMMGruB+UsJrXkpDGhAynAYp6TL@mail.gmail.com
Whole thread Raw
Responses Re: Moving the data directory  (Scott Mead <scottm@openscg.com>)
Re: Moving the data directory  (Frederiko Costa <frederiko@gmail.com>)
Re: Moving the data directory  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-admin
All,

I am using Ubuntu 10.04 and Postgres 8.4, I have been trying to move
my data dir to another device for the past couple of days but ran into
a lot of problems.

I did the following:

1. Copy the contents of /var/lib/postgresql/8.4/main to my folder.
2. Changed the data_directory in postgresql.conf.

When I start postgres using /etc/init.d script I get the following error,

* Starting PostgreSQL 8.4 database server
 * Error: could not exec /usr/lib/postgresql/8.4/bin/pg_ctl
/usr/lib/postgresql/8.4/bin/pg_ctl start -D
/media/extension/var/lib/postgresql/8.4/main/ -l
/var/log/postgresql/postgresql-8.4-main.log -s -o  -c
config_file="/etc/postgresql/8.4/main/postgresql.conf" :


I tried changing the ownership of the
/media/extension/var/lib/postgresql dir to <myusername>, postgres and
root. Now of them worked and I keep getting the same error message.

I found a lot of similar problems online but none had a solution.

Can someone help me with this?

TIA

Thanks,
Sairam Krishnamurthy
+1 612 859 8161

pgsql-admin by date:

Previous
From: Fabricio
Date:
Subject: Re: mapping libraries
Next
From: Scott Mead
Date:
Subject: Re: Moving the data directory