Re: Trouble setting up replication

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: clmartin(at)theombudsman(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Trouble setting up replication
Date: 2015-09-05 16:38:41
Message-ID: 55EB1A91.7020206@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/04/2015 04:07 PM, clmartin(at)theombudsman(dot)com wrote:
> I have been trying to set up "hot standby" replication, but have run
> into problems, and hope someone here can help.
>
> I have configured an ssh tunnel from a computer that is not on a public
> IP, and was unable to figure out how to run pg_basebackup from that
> server to backup the data from the main server, so I decided to run
> pb_basebackup on the main server and copy it later. So I did this:
>
> pg_basebackup -D /var/lib/pgsql/9.3/backups/rep/init -P -v -X s
>
> (after a number of other attempts), and got errors. First I got a
> permissions error, and found that the directory was owned by root
> instead of postgres. I changed that, but eventually I got this error:
>
> pg_basebackup: directory "/var/lib/pgsql/9.3/backups/rep" exists but is
> not empty

So what is in it?

>
> So my question is whether I can safely delete the directory and run
> pb_basebackup again?

Was that directory present before you ran pg_basebackup or did
pg_basebackup create it?

>
> I appreciate any help you can give. Let me know what additional
> information is needed to answer the question.
>
> Chuck
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2015-09-05 20:28:22 Re: Buffers: shared hit/read to shared_buffers dependence
Previous Message Marc Mamin 2015-09-05 12:36:41 Re: Any thoughts on a better approach to this query?