pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Chuck Martin <clmartin@theombudsman.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: getting pg_basebackup to use remote destination
Date: Sun, 30 Dec 2018 17:20:11 +0100
Message-ID: <187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.com> (raw)
In-Reply-To: <CAFw6=U3TkX=qGEshwUS4iipx3E2SUcP5=G7L6v2AgBGywiOHnA@mail.gmail.com>
References: <CAFw6=U3TkX=qGEshwUS4iipx3E2SUcP5=G7L6v2AgBGywiOHnA@mail.gmail.com>

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




view thread (11+ messages)  latest in thread

Message-ID: <187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.com>
Permalink:  ../187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.com/
Also on:    postgresql.org/message-id/187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, clmartin@theombudsman.com
  Subject: Re: getting pg_basebackup to use remote destination
  In-Reply-To: <187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.com>
  References: <CAFw6=U3TkX=qGEshwUS4iipx3E2SUcP5=G7L6v2AgBGywiOHnA@mail.gmail.com> <187b4154-dfaa-f215-e871-655e0ee821d4@2ndquadrant.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