Re: BUG #15092: pg_basebackup directory checking

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: mvisser(at)hotmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15092: pg_basebackup directory checking
Date: 2018-02-27 01:28:06
Message-ID: 20180227012806.GC3255@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Feb 26, 2018 at 03:45:42PM +0000, PG Bug reporting form wrote:
> I want to take regular backups on the standby machine using pg_basebackup.
>
> Using pg_basebackup on the non-master machine fails when using tablespaces
> and the tablespace directory already exists on the secondary machine.
>
> pg_basebackup: directory "/db/ts1" exists but is not empty

When saving a base backup on the same server as the one where the server
from which the backup is taken, you need to use --tablespace-mapping to
ensure that the tablespace of the backed up instance does not interfere
with the origin. You could as well use the tar format and untar things
after relinking properly things in pg_tblspc in the created data
folder.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-02-27 08:38:52 BUG #15093: hash partition exector plan is error!!!!
Previous Message Michael Paquier 2018-02-27 01:24:41 Re: BUG #14999: pg_rewind corrupts control file global/pg_control