Re: Move base directory to different location

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Move base directory to different location
Date: 2020-11-26 14:00:28
Message-ID: 31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Holger Jakobs 2020-11-26 14:03:29 Re: current log file removal
Previous Message Van Hoa Phan 2020-11-26 13:53:04 Re: current log file removal