Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyjVs-0003Yx-6c for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 20:07:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyjVq-00077R-BX for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 20:07:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyjVp-00077J-WA for pgsql-general@lists.postgresql.org; Sat, 08 Sep 2018 20:07:22 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyjVn-00011D-32 for pgsql-general@lists.postgresql.org; Sat, 08 Sep 2018 20:07:20 +0000 Received: from Davids-MacBook.local (unknown [50.233.106.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id B616954876; Sat, 8 Sep 2018 20:07:17 +0000 (UTC) Subject: Re: pgbackrest when data/base is symlinked to another volume To: pgsql-general@lists.postgresql.org, Ron References: <3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net> From: David Steele Message-ID: <83d9fd2e-49f2-7100-33b0-ff381a2c996b@pgmasters.net> Date: Sat, 8 Sep 2018 13:07:17 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/7/18 8:47 PM, Ron wrote: > On 09/07/2018 05:22 PM, David Steele wrote: >> >> On 9/6/18 11:21 PM, Ron wrote: >>> >>> Will pgbackrest properly backup and restore the cluster if data/base, >>> data/pg_xlog and data/pg_log are symlinks? >>> >>> PGDATA=/var/lib/pgsql/9.6/data >>> $PGDATA/base -> /Database/9.6/base >>> $PGDATA/pg_log -> /Database/9.6/pg_log >>> $PGDATA/pg_xlog -> /Database/9.6/pg_xlog >> >> Yes, this will work.  Note that restore does not recreate symlinks by >> default so you'll need to specify --link-all to enable symlink creation. >> >> See >> https://pgbackrest.org/configuration.html#section-restore/option-link-all >> for details. >> >> Using symlinks in this way will make management of your clusters more >> difficult, mostly because systems need more provisioning before >> restores can be performed.  In general I'd recommend against it unless >> there are performance considerations. > > Now that I'm thinking more about what you wrote... "data" isn't on it's > own partition.  data/*base* has it's own partition. > > What's the recommended method for putting *base**/* on a partition > different from data/?  Or is that not recommended? All the user data goes in base so there's really no need to separate it out of data. Typically pg_wal and tablespaces are relocated onto different devices for performance (or to get more space). If the partitions are on the same device then there's no performance benefit, just admin hassle. -- -David david@pgmasters.net