Re: Moving the data directory

From: Scott Mead <scottm(at)openscg(dot)com>
To: Sairam Krishnamurthy <kmsram420(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Moving the data directory
Date: 2011-02-15 22:27:53
Message-ID: AANLkTine4wsmdxr5spt_xx92TBX4ey33cM1uB9fThQ2s@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Feb 15, 2011 at 4:58 PM, Sairam Krishnamurthy
<kmsram420(at)gmail(dot)com>wrote:

> None. The log is empty.
>

Can you manually start the database as the postgres user:

/usr/lib/postgresql/8.4/bin/pg_ctl start -D
/media/extension/var/lib/postgresql/8.4/main/ -o
config_file="/etc/postgresql/8.4/main/postgresql.conf"

--Scott

>
> Thanks,
> Sairam Krishnamurthy
> +1 612 859 8161
>
>
>
> On Tue, Feb 15, 2011 at 3:45 PM, Scott Mead <scottm(at)openscg(dot)com> wrote:
> >
> > On Tue, Feb 15, 2011 at 4:41 PM, Sairam Krishnamurthy <
> kmsram420(at)gmail(dot)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?
> >
> > Do you have any useful information in the logs?
> >
> > /var/log/postgresql/postgresql-8.4-main.log
> >
> > --Scott
> >
> >
> >
> >>
> >> TIA
> >>
> >> Thanks,
> >> Sairam Krishnamurthy
> >> +1 612 859 8161
> >>
> >> --
> >> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> >> To make changes to your subscription:
> >> http://www.postgresql.org/mailpref/pgsql-admin
> >
> >
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sairam Krishnamurthy 2011-02-15 22:32:57 Re: Moving the data directory
Previous Message Sairam Krishnamurthy 2011-02-15 22:27:32 Re: Moving the data directory