Re: getting pg_basebackup to use remote destination

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: getting pg_basebackup to use remote destination
Date: 2018-12-29 20:38:04
Message-ID: 0245411e-2e67-7f52-7283-663d517005ab@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/29/18 11:04 AM, 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.
>
>
> While I think I could figure out how to backup to a local directory then
> rsync it to the new server, I'd like to avoid that due to the 750GB size.
>
>
> Is there a way to tell pg_basebackup to use a remote destination for
> output? Or do I have to run pg_basebackup on the standby server?

Not that I know of.

I would run it from the standby as a good deal of the heavy lifting is
done on the main server anyway. In either case the standby will incur
roughly the same load, namely receiving the data and writing it to disk.

>
>
> And while I'm asking, has anyone yet written a guide/tutorial for PG 11
> replication? Everything I find online is very old.

Maybe?:
https://www.postgresql.org/docs/11/high-availability.html

>
>
> Chuck Martin
> Avondale Software

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-12-29 20:47:17 Re: Using placeholders when creating a materialized view
Previous Message Chuck Martin 2018-12-29 19:04:37 getting pg_basebackup to use remote destination