pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: Sairam Krishnamurthy <kmsram420@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Moving the data directory
Date: Wed, 16 Feb 2011 07:51:46 -0500
Message-ID: <4D5BC862.7000301@2ndquadrant.com> (raw)
In-Reply-To: <AANLkTik0FbNw2RC=3dMMGruB+UsJrXkpDGhAynAYp6TL@mail.gmail.com>
References: <AANLkTik0FbNw2RC=3dMMGruB+UsJrXkpDGhAynAYp6TL@mail.gmail.com>

Sairam Krishnamurthy wrote:
> 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" :
>   

Debian and Ubuntu installations have a unique feature where you can have 
multiple PostgreSQL installations installed at the same time.  
Accordingly, the standard ways of managing the database described in the 
regular PostgreSQL documentation don't always work.  See 
http://www.stuartellis.eu/articles/postgresql-setup/ for a quick intro 
to this, specifically the "Using Multiple PostgreSQL Clusters" section.  
What you may need to change here is not the database's postgresql.conf, 
but instead the database cluster list you see when running pg_lsclusters.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books




view thread (18+ messages)  latest in thread

Message-ID: <4D5BC862.7000301@2ndquadrant.com>
Permalink:  ../4D5BC862.7000301@2ndquadrant.com/
Also on:    postgresql.org/message-id/4D5BC862.7000301@2ndquadrant.com

 · 

reply

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: greg@2ndquadrant.com, kmsram420@gmail.com
  Subject: Re: Moving the data directory
  In-Reply-To: <4D5BC862.7000301@2ndquadrant.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