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 1kiHtt-0004Gs-Tf for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:05:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiHts-0007uq-Rf for pgsql-admin@arkaria.postgresql.org; Thu, 26 Nov 2020 14:05:32 +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 1kiHts-0007uh-IR for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:05:32 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kiHtq-0008G1-Fz for pgsql-admin@lists.postgresql.org; Thu, 26 Nov 2020 14:05:31 +0000 Received: by mail-ej1-x635.google.com with SMTP id oq3so3085727ejb.7 for ; Thu, 26 Nov 2020 06:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/lFbvGGf69nt5/V2Xa2RBXvJoPXJrVGAvzZ+E6OM4jA=; b=Tcv7q9CqOlUQ8jdhHxfWPG7sx2BeYPpHap+Mu9h0xTH+wA4hpBKalk2eSQPA6Tnlsr ljncueNWPyqB1Oq17Y8gBcGQEWicpOI+/dwVFxwNk4QulwPCCAVI2QWqkW4zNgQhPPba 0JlrcnhxG4RLjPqTmDfkYtw8UzgUnXpFv694yoHwYpilD/+1MFhnd9sSdKCfC0GWvXYu aJnSZGa+JkJ1BFQgu36s/tmDO/HIK8RSdb0Z1HA2uur0OydRrTJgp7m7d9RnnsEeCogh RLucvbQowPXMYwW/GaK2XvLoRzHDPLotteY1lwACbrCnpB79l2BlCQHG3y4exEnvEWIb A4FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/lFbvGGf69nt5/V2Xa2RBXvJoPXJrVGAvzZ+E6OM4jA=; b=f0eJkQp22goGQpw/hzUh3i/G0kf8XfmAskjxIvGq2ngQYg4nh/2ztYfFyADlUIFtER cC3xX5EvyJ6RveWScRaRTTFcodjUHTl1V8owqcrDtaSTiZJu9OdyA5FlYJjFygDScs2/ Ds0jIy/xRD/0KaJIAGtKSiSUTBrtErkWfeuKfI/lW+FHdTPSpmFP33XuEbJfE5wl42U5 Ut7vBKm7yNzGwDIzQA11YboNIZ1tHrRnqTQvcIru9aV7452PsROqsuFqacRecFMD/NaR TuhTxJQtyiKmtNlUSFagL9aDdn7pXqNrvzBOygB9jfmWJVhPEnqfTDmPhk7pVCrca7Ca YTyQ== X-Gm-Message-State: AOAM531uwBBiEEPB4Hn2878VfHyOZiHI2K8Z5J5nj5SjEAgFsKHAnBwS M6InQBHV16hkP1cJx/F/Fn8= X-Google-Smtp-Source: ABdhPJwQQuULUJeUw9UJw455owyLoWCRE85i0ERETsDK4F4xUx4PvLDhGrHTiL2IaReln/DI6JxCPg== X-Received: by 2002:a17:906:5847:: with SMTP id h7mr2757459ejs.124.1606399527113; Thu, 26 Nov 2020 06:05:27 -0800 (PST) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id gf6sm3168993ejb.80.2020.11.26.06.05.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 06:05:26 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: Move base directory to different location From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> Date: Thu, 26 Nov 2020 15:05:26 +0100 Cc: pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <99166572-4225-4508-ADA6-F002339C2228@gmail.com> References: <31b748c7-d728-9d8d-fb49-b6b935b8295b@jakobs.com> To: Holger Jakobs X-Mailer: Apple Mail (2.3654.20.0.2.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Holger, > On 26. Nov, 2020, at 15:00, Holger Jakobs wrote: >=20 > It is no problem to move the base directory. >=20 > =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 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=