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 1kiIDT-00055c-13 for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:25:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiIDR-0003RD-TG for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:25:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIDR-0003Qo-MJ for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:25:45 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiIDP-0008PC-O4 for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:25:44 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 481D338037E; Thu, 26 Nov 2020 15:25:42 +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 CFXwRAKMGjZR; Thu, 26 Nov 2020 15:25:42 +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 F0B13380178; Thu, 26 Nov 2020 15:25:41 +0100 (CET) Subject: Re: Move base directory to different location To: pgsql-admin@lists.postgresql.org References: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> <99166572-4225-4508-ADA6-F002339C2228@gmail.com> From: Holger Jakobs Message-ID: <743cb100-60e5-8d44-5f16-122aadc78c4c@jakobs.com> Date: Thu, 26 Nov 2020 15:25:41 +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: <99166572-4225-4508-ADA6-F002339C2228@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gu8IZlwkfQkjcqzZdIiJtiZdftk9bIs0v" 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) --gu8IZlwkfQkjcqzZdIiJtiZdftk9bIs0v Content-Type: multipart/mixed; boundary="bkrHB1bhWsKAl4nPPJdLJApQvteEXbrm0"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <743cb100-60e5-8d44-5f16-122aadc78c4c@jakobs.com> Subject: Re: Move base directory to different location References: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> <99166572-4225-4508-ADA6-F002339C2228@gmail.com> In-Reply-To: <99166572-4225-4508-ADA6-F002339C2228@gmail.com> --bkrHB1bhWsKAl4nPPJdLJApQvteEXbrm0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: de-DE Hi Paul, You are perfectly correct. I just answered very specific to the question.= Regards, Holger Am 26.11.20 um 15:05 schrieb Paul F=C3=B6rster: > Hi Holger, > >> On 26. Nov, 2020, at 15:00, Holger Jakobs wrote: >> >> It is no problem to move the base directory. >> >> =E2=80=A2 stop the database server >> =E2=80=A2 move the base directory as a whole to some other location >> mv /var/lib/pgsql/10/data/base /some/other/location >> =E2=80=A2 create a symbolic link pointing to the new location >> cd /var/lib/pgsql/10/data >> ln -s /some/other/location/base . >> =E2=80=A2 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 jus= t start the database in the new PGDATA? Of course you'd need to reconfigu= re your PGDATA in this case but I consider it more clean than running a d= atabase cluster on a symlink. > > Cheers, > Paul > --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --bkrHB1bhWsKAl4nPPJdLJApQvteEXbrm0-- --gu8IZlwkfQkjcqzZdIiJtiZdftk9bIs0v Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCX7+65QUDAAAAAAAKCRCKV5yTsxlhumpU AJ4tJgUcoPWNP0OK0qmtyt/F52bBLgCgkp/eQtwJR9YdK+aUcIyzINntDtc= =Dljo -----END PGP SIGNATURE----- --gu8IZlwkfQkjcqzZdIiJtiZdftk9bIs0v--