Re: getting pg_basebackup to use remote destination - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: getting pg_basebackup to use remote destination
Date
Msg-id 187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.com
Whole thread Raw
In response to getting pg_basebackup to use remote destination  (Chuck Martin <clmartin@theombudsman.com>)
Responses Re: getting pg_basebackup to use remote destination  (Chuck Martin <clmartin@theombudsman.com>)
List pgsql-general
On 29/12/2018 20:04, Chuck Martin wrote:
> I thought I knew how to do this, but I apparently don't. I have to set
> up a new server as a standby for a PG 11.1 server. The main server has a
> lot more resources than the standby. What I want to do is run
> pg_basebackup on the main server with the output going to the data
> directory on the new server. But when I give this command:
> 
> pg_basebackup -D "ssh root@10.0.1.16:/mnt/dbraid/data" -P -v -X s
> 
> 
> it instead writes to my root drive which doesn't have the space, so it
> fails and deletes the partial backup. 

What you might be thinking of is the "old" method of doing base backups
before pg_basebackup:  Call pg_start_backup() and then do file system
operations (tar, scp, whatever) to move the data files to where you want
them.  This is mostly obsolete.  You should run pg_basebackup on the
host where you want to set up your standby.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: Recursive CTE
Next
From: Chuck Martin
Date:
Subject: Re: getting pg_basebackup to use remote destination