Re: getting pg_basebackup to use remote destination

From: Chuck Martin <clmartin(at)theombudsman(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: getting pg_basebackup to use remote destination
Date: 2018-12-30 16:52:10
Message-ID: CAFw6=U0C9PVMqO8EMDZCi80q6gAyMq3_xkXzxT3E2HW3010R3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 30, 2018 at 11:20 AM Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> 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(at)10(dot)0(dot)1(dot)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

Thanks. It’s been a while since I set up replication. Not to mention
several Postgres versions. I’ve started pg_basebackup from the standby. It
failed once due to an ssh error, but I reloaded sshd and started again. May
take a while. It about 750gb.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-12-30 16:56:13 Re: In which session context is a trigger run?
Previous Message Peter Eisentraut 2018-12-30 16:20:11 Re: getting pg_basebackup to use remote destination