Re: move database directory

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: move database directory
Date: 2002-03-06 22:00:34
Message-ID: Pine.LNX.4.10.10203061657490.13163-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Since you are using linux :-)

I have postgres in /usr/local/pgsql the default place

I was running out of room and needed to move it to /opt

The easiest way i found was to

bash$ mv /usr/local/pgsql /opt

bash$ ln -s /opt/pgsql /usr/local/pgsql

This will create the symbolic link and therefore postgres will be none the
wiser that infact its directory has changed

You do not even need to do anything to the database except stop it before
you move and then restart it once you have moved

Darren Ferguson

On Wed, 6 Mar 2002, Johnson, Shaunn wrote:

> Howdy:
>
> Running Postgres 7.1.3 on RedHat Linux 7.2 kernel
> 2.4.7 rev. 10.
>
> My situation is this: I'm running out of room
> on a partition where the database resides.
> I'd like to move the database directory to another
> partition.
>
> I don't supposed there is a 'howto' and 'reminder'
> for pulling off such things, is there? As I've
> never done this before, I keep thinking that
> there is more to it than remapping the
> postmaster from startup and vacuum analyze
> all of the tables after the move.
>
> Any suggestions / documentation about such
> matters?
>
> Thanks!
>
> -X
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2002-03-06 22:03:13 Re: joins?
Previous Message Dave Page 2002-03-06 21:50:56 Re: [ODBC] ODBC from win2k to postgres on Linux HELL