pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Move base directory to different location
Date: Thu, 26 Nov 2020 15:00:28 +0100
Message-ID: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> (raw)
In-Reply-To: <CALhHtcANxVwbRYZYyBtZ4G4jJtm+b4vJgs5vp=8twS-9YWC41Q@mail.gmail.com>
References: <CALhHtcANxVwbRYZYyBtZ4G4jJtm+b4vJgs5vp=8twS-9YWC41Q@mail.gmail.com>

It is no problem to move the base directory.

 1. stop the database server
 2. move the base directory as a whole to some other location
    mv /var/lib/pgsql/10/data/base /some/other/location
 3. create a symbolic link pointing to the new location
    cd /var/lib/pgsql/10/data
    ln -s /some/other/location/base .
 4. start the database server

BTW, an upgrade to a newer major version would be a good idea.

Regards,

Holger

Am 26.11.20 um 13:59 schrieb Yambu:
> Hello
>
> May i know the procedure of moving the base directory from 
> /var/lib/pgsql/10/data/base to another location?
>
> regards

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

Attachments:

  OpenPGP_signature (application/pgp-signature, 202B) download

view thread (13+ messages)  latest in thread

Message-ID: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com>
Permalink:  ../31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com/
Also on:    postgresql.org/message-id/31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.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: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Move base directory to different location
  In-Reply-To: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.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