Re: Move base directory to different location

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: Pepe TD Vo <pepevo(at)yahoo(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Move base directory to different location
Date: 2020-11-26 14:27:10
Message-ID: f311483e-50ae-2d8b-b41d-72570974d33c@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Have a look here:
https://info.crunchydata.com/blog/how-to-perform-a-major-version-upgrade-using-pg_upgrade-in-postgresql

I couldn't write it any better.

Am 26.11.20 um 15:06 schrieb Pepe TD Vo:
> Morning Holdger,
>
> since you are mentioning "upgrade to a newer major version", would you
> please share step by step how to do it in replica?  I have tried to
> migrate  v.11 to 12 before and failed to upgrade.
>
> v/r,
>
>
> **
> *Bach-Nga
>
> *No one in this world is pure and perfect. If you avoid people for
> their mistakes you will be alone. So judge less, love, and forgive
> more.EmojiEmojiEmoji
> To call him a dog hardly seems to do him justice though in as much as
> he had four legs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he was a perfect
> gentleman (Hermione Gingold)
>
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
>
>
>
>
> On Thursday, November 26, 2020, 09:00:48 AM EST, Holger Jakobs
> <holger(at)jakobs(dot)com> wrote:
>
>
> 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

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-11-26 14:30:07 Re: Move base directory to different location
Previous Message Holger Jakobs 2020-11-26 14:25:41 Re: Move base directory to different location