Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiHp9-000443-8V for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:00:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiHp6-00022l-Rz for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:00:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiHp6-00022c-KM for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:00:36 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiHp3-0005fe-St for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:00:36 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 8BBA038037E; Thu, 26 Nov 2020 15:00:32 +0100 (CET) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lGB2ShALHnDZ; Thu, 26 Nov 2020 15:00:32 +0100 (CET) Received: from [192.168.178.197] (ip-37-201-154-46.hsi13.unitymediagroup.de [37.201.154.46]) by rs.plausibolo.de (Postfix) with ESMTPSA id 3DFBF380178; Thu, 26 Nov 2020 15:00:32 +0100 (CET) Subject: Re: Move base directory to different location To: pgsql-admin@lists.postgresql.org References: From: Holger Jakobs Message-ID: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> Date: Thu, 26 Nov 2020 15:00:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kz6UKAHL6BbMHzqqJ0iVRwlW42s7UbPzO" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kz6UKAHL6BbMHzqqJ0iVRwlW42s7UbPzO Content-Type: multipart/mixed; boundary="Zjb4PajA5TJ0Nd9KqzjGhUBb4jk3U2w4s"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> Subject: Re: Move base directory to different location References: In-Reply-To: --Zjb4PajA5TJ0Nd9KqzjGhUBb4jk3U2w4s Content-Type: multipart/alternative; boundary="------------D432398BE65A27DEE3869451" Content-Language: de-DE This is a multi-part message in MIME format. --------------D432398BE65A27DEE3869451 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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=20 > /var/lib/pgsql/10/data/base to another location? > > regards --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --------------D432398BE65A27DEE3869451 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

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
--=20
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
--------------D432398BE65A27DEE3869451-- --Zjb4PajA5TJ0Nd9KqzjGhUBb4jk3U2w4s-- --kz6UKAHL6BbMHzqqJ0iVRwlW42s7UbPzO Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCX7+0/AUDAAAAAAAKCRCKV5yTsxlhuo82 AKDfPQY1p8iJt9kYuss24qSu8PUZ5wCfbKKVz/HuyOOiAO5xR5a/NYXqmu4= =SJ5M -----END PGP SIGNATURE----- --kz6UKAHL6BbMHzqqJ0iVRwlW42s7UbPzO--