Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0A77F1337B4A for ; Tue, 15 Feb 2011 18:58:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 13515-06 for ; Tue, 15 Feb 2011 22:58:18 +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 09DC9133655C for ; Tue, 15 Feb 2011 18:58:16 -0400 (AST) Received: by iwn9 with SMTP id 9so695181iwn.19 for ; Tue, 15 Feb 2011 14:58:17 -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=fThOXKRxIuIE8DZ4U2tcAcMjc5IFGdXzLFBbheK4aps=; b=Dt4opnlwsoHa8e6szsKTgwu1tOOSly/koPmQDACwE6CxQqrCeZ+ZRdl/89zF1GZDhD t7kePyBpxXGRKssVM8SPuVDvsX+C6ieJzZSO6/PYlMJn91YtOrDayulMB14BpNbvPPk9 xqxdfz5MCbN3DQ4uzMktb/WbcTEJu24gDnxM8= 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=wDdyNWwou7iNaTirJCoT2Dwd2KRU4CY5xgjk8/9lzHZqrR/SHmMZEG3V8ixRW/vmoy HxrsdkrV9OEy6COrZ2p5OwTtwd6G/r41OpHXvfEkporfxqkMWMTyGAAg+UFNVVsjWQkV ajcOGGP6tpt2/ogjUx7pWWiJ1EJidFAaT6Q4s= Received: by 10.231.85.137 with SMTP id o9mr4501339ibl.27.1297810697024; Tue, 15 Feb 2011 14:58:17 -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 i16sm3948304ibl.12.2011.02.15.14.58.15 (version=SSLv3 cipher=OTHER); Tue, 15 Feb 2011 14:58:16 -0800 (PST) Message-ID: <4D5B0507.6090909@gmail.com> Date: Tue, 15 Feb 2011 16:58:15 -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> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000005020701080609060400" 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/140 X-Sequence-Number: 36779 This is a multi-part message in MIME format. --------------000005020701080609060400 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 >> >> --------------000005020701080609060400 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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


--------------000005020701080609060400--