Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0F1951337B4A for ; Tue, 15 Feb 2011 18:27:42 -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 53777-02 for ; Tue, 15 Feb 2011 22:27:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 606F6133655C for ; Tue, 15 Feb 2011 18:27:34 -0400 (AST) Received: by iwn9 with SMTP id 9so669644iwn.19 for ; Tue, 15 Feb 2011 14:27:34 -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=aJNhHwJfvoFo7a+Be7ArC+AzkAQk71PJMXP32pRzgwo=; b=u33aa0b4OlBHNtiAXRhC9cvXAi2mwyfaWd54Wy0ba/d4I6DrjZCZNua1Ax4AlI0x9z zi0CBCsGREG+bMIMxm6H09zNnNjR15JCX47Nq656ZhiltttKbO81vkLpSGBLOBxvGSxi 0QbTWtq4r+yfbG77Nh0e9IsrB8mfZWBdYLWdY= 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=BqysmFOC5TFB691qGuEBrZME0U5xYiKfpBWoBIcIynJcwO/+v+qXefLQQ8FBFxs7LE u5e/23HmVhi/g9FAGbDKXangg4zENvI1ZSKdgM92my67psI6b1oCUlagvo4oPUDQwnVN Tcp0fa+OlohQu0ci53i8E5r07OTTYfK8IRtTA= Received: by 10.42.167.65 with SMTP id r1mr7118079icy.65.1297808854129; Tue, 15 Feb 2011 14:27:34 -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 u9sm3931401ibe.14.2011.02.15.14.27.33 (version=SSLv3 cipher=OTHER); Tue, 15 Feb 2011 14:27:33 -0800 (PST) Message-ID: <4D5AFDD4.7010006@gmail.com> Date: Tue, 15 Feb 2011 16:27:32 -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: In-Reply-To: Content-Type: multipart/alternative; boundary="------------050806090208070108030106" 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/132 X-Sequence-Number: 36771 This is a multi-part message in MIME format. --------------050806090208070108030106 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 >> --------------050806090208070108030106 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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

--------------050806090208070108030106--