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 1fySwV-0008UD-O4 for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 02:25:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fySwT-0004MB-O2 for pgsql-general@arkaria.postgresql.org; Sat, 08 Sep 2018 02:25:45 +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 1fySwT-0004M3-AZ for pgsql-general@lists.postgresql.org; Sat, 08 Sep 2018 02:25:45 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fySn7-0003NL-Cz for pgsql-general@postgresql.org; Sat, 08 Sep 2018 02:16:22 +0000 Received: by mail-oi0-x241.google.com with SMTP id 13-v6so30754997ois.1 for ; Fri, 07 Sep 2018 19:16:02 -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-transfer-encoding:content-language; bh=fm/+vgkmVNEmZK/7YD3X5OlwHoYwoFkCoBqWJUuL2GY=; b=EOGDVTEUz3r325RFwldrEezje5Ot101V/hFy4p2eUeEdfPbasJIXm74HnUFVOZ65pg jtX9cIGeIxIqxv8gbV2HDGFzAlIwdDdBf47SvqRoGYNHotZMuF6/uCZ/Hqp8X0IXW5/r gj7+6XOxxmabmaNCQYXuiZ8KMms53NkOo5Ru2uCZQfNc95PP7mIZejDEby97J6QRFKXn YaT8Fe47fBGhruhVtYQ4N6zfDvj9+3csrVAJNSOW6WFJh//Mdahh31kEfbJJMvaQ0Cut 7yRFA4DiB2baagikkZLKxz+DYMBRHUrbJkVyKl4lqQaJxq4qLUOCLuKEhVp0GS62sV5v MKNw== 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-transfer-encoding :content-language; bh=fm/+vgkmVNEmZK/7YD3X5OlwHoYwoFkCoBqWJUuL2GY=; b=p2cl4PSfKPhKrExKtNR9meYkzBNGHxeBdv3Zb0SNxhFs+ue/q7vkyp270ZrjBl+9LT yHfsVRmbjx1ADajB2PIo6Ga7Ie5GAEuaao2V8vsox3KDgMIdw/yM501aZVm0YysIQ+ss 7UbUOWa1BUOQ1ZCM4kfnfgFiBxBxtIOad1XuKPpKdrlexrqEBqDRTDmLRmMOhccr4n/s SKAqaodoPMKoNTHvS3WFoX7O3lJagg9zdihMSBfAxnrVLgLWLjm5wIiPnrEukMeF0GHY 8VTwcTLwQq10JZ6AbKfU9AYdZtqvqYayOHq+GaQ0FQXNOhWb1wboY0ZRMHfZtr8UoaJ4 R+GQ== X-Gm-Message-State: APzg51CV7kKl9xdVwBsrye5enP8ZGwOfVSbAmXFvD+WUFFCGDxk9g45J Ev6K7MlFjqI5QCEKWfmWWR1SzoiK X-Google-Smtp-Source: ANB0VdbI0rQZkYNPKnz8N6B4koyAYTxmv7NEf0pccdfPtlH5zhAcZxtqbgfhT4FT5yNelHX7xTZfyQ== X-Received: by 2002:a54:4017:: with SMTP id x23-v6mr10316974oie.25.1536372960977; Fri, 07 Sep 2018 19:16:00 -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 r187-v6sm8317418oie.43.2018.09.07.19.15.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 19:16:00 -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 21:15:59 -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: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. > > Also, you might consider using log_directory to relocate log files rather > than a symlink.  This will exclude log files from your backup which is > usually preferable -- primary logs restored to a standby are out of > context and can cause confusion. Thanks for the tips.  I'll probably implement that on our new systems. -- Angular momentum makes the world go 'round.