Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3D80C133655C for ; Tue, 15 Feb 2011 19:02:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15812-08 for ; Tue, 15 Feb 2011 23:01:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iy0-f174.google.com (mail-iy0-f174.google.com [209.85.210.174]) by mail.postgresql.org (Postfix) with ESMTP id 526DF1337B4A for ; Tue, 15 Feb 2011 19:01:56 -0400 (AST) Received: by iyj8 with SMTP id 8so592884iyj.19 for ; Tue, 15 Feb 2011 15:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=WatYb96RryDJ1hgkrcbxRApYXCT/+/yBq+f0h9gil5g=; b=kdjG//EAdCp172AlII9HaBCB+AaD9/rgqZch/zCrSUHbmR16GpLd/tKE6hABvZpwUG T7aKrEmsQ2X6Z0ffJYdh8j4lIqca0PRc/jvS35BYzbHc0utkxl4JyGgKPl/sI+m3yNpY 9cG6UWVX/3chu3BYZx2t33RjHU1x9QCANBrWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=O8RysftI9x8zhHFQOjWAM7xj+XS69KeyZCox00WNYT590txw/IqasIPXC9wRXuc6v9 Ldog29JecWAHNf/Yr4R90LtOn5KoZRmXZlzjxtZ47LHwgpytlZRTfwAssVw3+tYNR3nH K4O0fNI1PjuAHiFQn1wMrhDOgR4yQTYQAgsQc= Received: by 10.231.36.137 with SMTP id t9mr4326740ibd.195.1297810916360; Tue, 15 Feb 2011 15:01:56 -0800 (PST) Received: from [128.101.33.40] (cs-wlc-040.cs.umn.edu [128.101.33.40]) by mx.google.com with ESMTPS id u9sm3952707ibe.20.2011.02.15.15.01.55 (version=SSLv3 cipher=OTHER); Tue, 15 Feb 2011 15:01:55 -0800 (PST) Message-ID: <4D5B05E3.7080109@gmail.com> Date: Tue, 15 Feb 2011 17:01:55 -0600 From: Sairam Krishnamurthy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Frederiko Costa CC: pgsql-admin@postgresql.org Subject: Re: Moving the data directory References: <4D5AFDD4.7010006@gmail.com> <4D5B0507.6090909@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060706000701010708040604" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.045 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/142 X-Sequence-Number: 36781 This is a multi-part message in MIME format. --------------060706000701010708040604 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I followed the preferred way to migrate the data and ran into this problem. So i guess I am stuck here and cant get any help from the docs. Thanks, Sairam Krishnamurthy +1 612 859 8161 On 02/15/2011 04:59 PM, Frederiko Costa wrote: > You might find something in the documentation about migrating the data > directory to another server. > > ~Fred > Linkedin profile: http://www.linkedin.com/in/frederikocosta > > > > On Tue, Feb 15, 2011 at 2:58 PM, Sairam Krishnamurthy > wrote: >> Frederiko, >> >> I will try that. I was hoping to have a better solution than to reinstall >> postgres. >> >> Thanks, >> Sairam Krishnamurthy >> +1 612 859 8161 >> >> On 02/15/2011 04:56 PM, Frederiko Costa wrote: >> >> What I meant was that when you install postgresql, you initialize the >> area where your data directory will be. There you have the database, >> config files, logs, etc. Before you restore the DB into the new pgsql, >> as far as I'm aware, you have to create/init this area. >> >> On Tue, Feb 15, 2011 at 2:27 PM, Sairam Krishnamurthy >> wrote: >> >> Can you explain a bit? I dint get what you mean data area. >> >> Thanks, >> Sairam Krishnamurthy >> +1 612 859 8161 >> >> On 02/15/2011 04:09 PM, Frederiko Costa wrote: >> >> I would recommend to create the data area in the destination pgsql >> server and dump the source database into it, rather than copying the >> data directory. >> >> On Tue, Feb 15, 2011 at 1:41 PM, Sairam Krishnamurthy >> wrote: >> >> 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, 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 >> >> -- >> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-admin >> >> >> --------------060706000701010708040604 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit I followed the preferred way to migrate the data and ran into this problem. So i guess I am stuck here and cant get any help from the docs.
Thanks,
Sairam Krishnamurthy
+1 612 859 8161

On 02/15/2011 04:59 PM, Frederiko Costa wrote:
You might find something in the documentation about migrating the data
directory to another server.

~Fred
Linkedin profile: http://www.linkedin.com/in/frederikocosta



On Tue, Feb 15, 2011 at 2:58 PM, Sairam Krishnamurthy
<kmsram420@gmail.com> wrote:
Frederiko,

I will try that. I was hoping to have a better solution than to reinstall
postgres.

Thanks,
Sairam Krishnamurthy
+1 612 859 8161

On 02/15/2011 04:56 PM, Frederiko Costa wrote:

What I meant was that when you install postgresql, you initialize the
area where your data directory will be. There you have the database,
config files, logs, etc. Before you restore the DB into the new pgsql,
as far as I'm aware, you have to create/init this area.

On Tue, Feb 15, 2011 at 2:27 PM, Sairam Krishnamurthy
<kmsram420@gmail.com> wrote:

Can you explain a bit? I dint get what you mean data area.

Thanks,
Sairam Krishnamurthy
+1 612 859 8161

On 02/15/2011 04:09 PM, Frederiko Costa wrote:

I would recommend to create the data area in the destination pgsql
server and dump the source database into it, rather than copying the
data directory.

On Tue, Feb 15, 2011 at 1:41 PM, Sairam Krishnamurthy
<kmsram420@gmail.com> wrote:

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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



--------------060706000701010708040604--