pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: archive command in streaming replication in windows server
Date: Thu, 29 Oct 2020 20:16:38 +0100
Message-ID: <1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de> (raw)
In-Reply-To: <CA+ONtZ6O1ECKOPg5CNA1KO6i6Upmj2TgeiaePGqSHzDy-MUvbA@mail.gmail.com>
References: <CA+ONtZ6O1ECKOPg5CNA1KO6i6Upmj2TgeiaePGqSHzDy-MUvbA@mail.gmail.com>



Am 29.10.20 um 20:12 schrieb Atul Kumar:
> hi,
>
> I am trying to configure streaming replication on windows server.
>
> i have postgres version 10
>
> after successful installation of postgres, I create a archive
> directory "C:\Program Files\PostgreSQL\10\archive_files"  and here in
> archive_flies, I need to copy the wal files.
>
> in postgresql conf file I gave path in archive_command like this:
>
> 'copy %p C:\Program Files\PostgreSQL\10\archive_files\%f'
>
> After successfully restarting the postgres service, I could not find
> any file in the archive directory.
>
> and when I am giving command
> show archive_command
>
> I get this as an output
>
> "copy %p C:Program FilesPostgreSQL archive_files%f"
>
> So please help in setting me the correct path format.

from the fine documentation an example:

archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'  # Unix
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"'  # Windows


https://www.postgresql.org/docs/current/continuous-archiving.html


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com






view thread (4+ messages)  latest in thread

Message-ID: <1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de>
Permalink:  ../1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de/
Also on:    postgresql.org/message-id/1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de

 · 

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: andreas@a-kretschmer.de
  Subject: Re: archive command in streaming replication in windows server
  In-Reply-To: <1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de>
  References: <CA+ONtZ6O1ECKOPg5CNA1KO6i6Upmj2TgeiaePGqSHzDy-MUvbA@mail.gmail.com> <1ed53e80-fe86-a8a9-b093-2bab166b2abc@a-kretschmer.de>

* 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