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 1fyUEE-0003tY-Nu for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 03:48:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyUEA-0002R5-GL for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 03:48:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyUEA-0002Qy-6U for pgsql-general@lists.postgresql.org; Sat, 08 Sep 2018 03:48:06 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fyUE5-0002ex-RZ for pgsql-general@postgresql.org; Sat, 08 Sep 2018 03:48:05 +0000 Received: by mail-oi0-x241.google.com with SMTP id l82-v6so30844901oih.11 for ; Fri, 07 Sep 2018 20:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=7QrMc4VEoeZpYvj1YTWZCToU5sJj6mxUtiptY6SeGHc=; b=RNbTgc5fyuUzvkTGMLiGpRLCVaroVnLSkcN3/sZONA7U9yhzMQ097Sjlr2A6XAtcSV NuHLrE+k2x48D0+/utF3BXeltOipmGSwpOJBe23wkAaFmRunsdRkJYizvV4g0891l/nb 5MEa9Xzvg8NYVDtmsedmXVCh1pfc6KHfGv697AH1hd1N+7ewihLjevSQj3iz7p3siHLW ze/ir27cwWfia7xXNS799/mB1oPTOEMbwVmWUNjUVFApMslZD2sdxcpsU7viHJkOH+mV 6WqEyaQvRqQ85atMz649g/TuCQpfvNC0ijqw8xHrn8Xvg5tVTzZbFtkS3br8JnHanv6Y rPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=7QrMc4VEoeZpYvj1YTWZCToU5sJj6mxUtiptY6SeGHc=; b=j/AfD/y/0rhy3Lmg3eY6D+ErpNzesezuhkebraozT+p4fEh+WaIt5BTm43wNnSNNy4 T5KCtbn9sLXFq6ZgCIdha6z1sOxAA1PyM3VBnK1vVraCps3GHtFv3Q8CBFr4Wp2vZzes taIPhqRr4Je9r8JGYML8uxoHBRMEMsQprYIL2r8c0qiIPX4L898LQRxSNQIGakPXE0Cx bC6rJwyNPWWaq4NcjobuxKrR4CWMz52/5kFKsEE8wIRzS0768Bhz2nffYfJReTbpYpVi j6qEdLdi/Ck8yI380eZTPuv0COQJOIRZbLELnxr0laLcmYeoMWJIXmKF60f5bW8dAW/J 0uNA== X-Gm-Message-State: APzg51A30i+pFc5eq2O1OQWghTUaBVTFjR8d6vaicAkEIPMjiV7Z0Uu1 aPRmmqFRKNt11eAWggaIpt6rcKU4 X-Google-Smtp-Source: ANB0VdaEk2Xdkb+k5PcJKZKPR0GeaWgp0ia6pl2rV/lkEWhrzVjW+kgPBAkVxi/qGIKUzjEzZ/+QDA== X-Received: by 2002:aca:69cf:: with SMTP id e198-v6mr11016205oic.78.1536378479559; Fri, 07 Sep 2018 20:47:59 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id s145-v6sm15991903oih.16.2018.09.07.20.47.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 20:47:58 -0700 (PDT) Subject: Re: pgbackrest when data/base is symlinked to another volume To: pgsql-general@postgresql.org References: <3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net> From: Ron Message-ID: Date: Fri, 7 Sep 2018 22:47:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <3db7c0dc-b5e8-fab6-3521-bc60e2c1375b@pgmasters.net> Content-Type: multipart/alternative; boundary="------------3E2EC3F97B3FED0B7C41053D" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------3E2EC3F97B3FED0B7C41053D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 09/07/2018 05:22 PM, David Steele wrote: > Hi Ron, > > 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? -- Angular momentum makes the world go 'round. --------------3E2EC3F97B3FED0B7C41053D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 09/07/2018 05:22 PM, David Steele wrote:
Hi Ron,

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?


--
Angular momentum makes the world go 'round.
--------------3E2EC3F97B3FED0B7C41053D--