pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: Tablespace symlinks
Date: Mon, 30 Jan 2017 16:57:33 +0200
Message-ID: <588F545D.1060604@matrix.gatewaynet.com> (raw)
In-Reply-To: <CACwHmfE6Cmzvmj9ELMYHqpdeg99oE5fu2vfSdmzUxssZhJ_qRw@mail.gmail.com>
References: <CACwHmfE6Cmzvmj9ELMYHqpdeg99oE5fu2vfSdmzUxssZhJ_qRw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

tar != "the server" . The doc tells you the server will consult /tablespace_map. /What does this file look like in your base.tar.gz ?

On 30/01/2017 16:24, Slavcho Trnkovski wrote:
> Hi,
> I'm using PostgreSQL 9.5.
> As backup I use pg_basebackup with options /--format=t -v -z -P /.
> These are the steps I do for restore:
> 1.
> tar -xzf base.tar.gz -C $PGDATA
> 2.
> for f in `ls | grep -v base.tar.gz `; do
> echo "tar  -xf $f -C $PGDATA/pg_tblspc/`echo $f|cut -d'.' -f 1`"
> tar -xf $f -C $PGDATA/pg_tblspc/`echo $f|cut -d'.' -f 1`
> done
>
> I​ ha
> ​ v​
> e​
> ​ problem because ​symlinks for my tablespaces are not being created in step 1.
>
> ​ According to https://www.postgresql.org/docs/9.5/static/app-pgbasebackup.html :
> "/When tar format mode is used, it is the user's responsibility to unpack each tar file before starting the PostgreSQL server. If there are additional tablespaces, the tar files for them need to be 
> unpacked in the correct locations. In this case the symbolic links for those tablespaces will be created by the server according to the contents of the tablespace_map file that is included in the 
> base.tar// file./"
> my understanding is that these symbolic links should be created with the first step.
>
> I was using same approach with PostgreSQL 9.4, and it was OK.
>
> So, is this new behavior in 9.5 (so I shall handle it manually), or I am missing something?
>
> Regards,
> Slavcho
>
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

view thread (4+ messages)  latest in thread

Message-ID: <588F545D.1060604@matrix.gatewaynet.com>
Permalink:  ../588F545D.1060604@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/588F545D.1060604@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: Tablespace symlinks
  In-Reply-To: <588F545D.1060604@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox