From: Sairam Krishnamurthy <kmsram420@gmail.com>
To: Frederiko Costa <frederiko@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Moving the data directory
Date: Tue, 15 Feb 2011 16:58:15 -0600
Message-ID: <4D5B0507.6090909@gmail.com> (raw)
In-Reply-To: <AANLkTikGC8YTjR9BCnWjFyXSaJZCQj1mBQWRZ3vq4_XL@mail.gmail.com>
References: <AANLkTik0FbNw2RC=3dMMGruB+UsJrXkpDGhAynAYp6TL@mail.gmail.com>
<AANLkTi=LmLCJaTJ-VUpg+aJuDmJHNkpOcVQLO22xjcZr@mail.gmail.com>
<4D5AFDD4.7010006@gmail.com>
<AANLkTikGC8YTjR9BCnWjFyXSaJZCQj1mBQWRZ3vq4_XL@mail.gmail.com>
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
>>
>>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: kmsram420@gmail.com, frederiko@gmail.com
Subject: Re: Moving the data directory
In-Reply-To: <4D5B0507.6090909@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox