Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1106A1337B69 for ; Wed, 16 Feb 2011 08:51:59 -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 65868-01 for ; Wed, 16 Feb 2011 12:51:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id 28D9C1337B8A for ; Wed, 16 Feb 2011 08:51:50 -0400 (AST) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MB15o-1Pzd0Z1cdY-009vlC; Wed, 16 Feb 2011 13:51:47 +0100 Message-ID: <4D5BC862.7000301@2ndquadrant.com> Date: Wed, 16 Feb 2011 07:51:46 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Sairam Krishnamurthy CC: pgsql-admin@postgresql.org Subject: Re: Moving the data directory References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:cm+RMk1WqxVLeogVmOuAxIiFhGTY9Q/l7YzQCG/4+jJ rfmrV5ursoNgYKVQXBUc2efQAT6IpHOwL989OWk61O1nSmR/4D cwWeqYDMaHaOerQ+4l0tuv8Js32yeKJWX1mz0LZC7TV8ebo7Vo n2IJjpAMv+OIPNgNFyrBP2c0FaEHnEyh0AZDNO8TKtl6tivePA IL/ILNJwC2Gj2zR9uL5s+Hs9ydz5YwTC0c6stFle+M= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201102/147 X-Sequence-Number: 36786 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