Re: Move base directory to different location

Поиск
Список
Период
Сортировка
От Paul Förster
Тема Re: Move base directory to different location
Дата
Msg-id 99166572-4225-4508-ADA6-F002339C2228@gmail.com
обсуждение исходный текст
Ответ на Re: Move base directory to different location  (Holger Jakobs <holger@jakobs.com>)
Ответы Re: Move base directory to different location  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin
Hi Holger,

> On 26. Nov, 2020, at 15:00, Holger Jakobs <holger@jakobs.com> wrote:
>
> It is no problem to move the base directory.
>
>     • stop the database server
>     • move the base directory as a whole to some other location
> mv /var/lib/pgsql/10/data/base /some/other/location
>     • create a symbolic link pointing to the new location
> cd /var/lib/pgsql/10/data
> ln -s /some/other/location/base .
>     • start the database server
> BTW, an upgrade to a newer major version would be a good idea.

why not just move the whole database and NOT create a symlink? Then just start the database in the new PGDATA? Of
courseyou'd need to reconfigure your PGDATA in this case but I consider it more clean than running a database cluster
ona symlink. 

Cheers,
Paul


В списке pgsql-admin по дате отправления:

Предыдущее
От: Holger Jakobs
Дата:
Сообщение: Re: current log file removal
Следующее
От: Pepe TD Vo
Дата:
Сообщение: Re: Move base directory to different location