From: | Paul Förster <paul(dot)foerster(at)gmail(dot)com> |
---|---|
To: | Holger Jakobs <holger(at)jakobs(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Move base directory to different location |
Date: | 2020-11-26 14:05:26 |
Message-ID: | 99166572-4225-4508-ADA6-F002339C2228@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Holger,
> On 26. Nov, 2020, at 15:00, Holger Jakobs <holger(at)jakobs(dot)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 course you'd need to reconfigure your PGDATA in this case but I consider it more clean than running a database cluster on a symlink.
Cheers,
Paul
From | Date | Subject | |
---|---|---|---|
Next Message | Pepe TD Vo | 2020-11-26 14:06:19 | Re: Move base directory to different location |
Previous Message | Holger Jakobs | 2020-11-26 14:03:29 | Re: current log file removal |