pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: archive_commnad parameter question
Date: Mon, 19 Apr 2021 14:16:41 -0700
Message-ID: <38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.com> (raw)
In-Reply-To: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>
References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>

On 4/19/21 2:09 PM, Allie Crawford wrote:
> Hello,
> 
> I am new in PostgreSQL and I am trying to understand what the “test” 
> word is representing in the archive_command configuration that the 
> PostgreSQL documentation is showing as the format on how to set up this 
> parameter
> 
> archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p 
> /mnt/server/archivedir/%f'  # Unix
> 
> Does anybody know what is “test” representing in this parameter 
> configuration?

Per the docs:

"This is an example, not a recommendation, and might not work on all 
platforms."

test in this case refers to a shell command:

https://www.computerhope.com/unix/bash/test.htm

So this only works in environments that have that command.

> 
> Thank in advance for your help on this.
> 
> Regards,
> 
> Allie
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)  latest in thread

Message-ID: <38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.com>
Permalink:  ../38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.com/
Also on:    postgresql.org/message-id/38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.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: adrian.klaver@aklaver.com, CrawfordMA@ChurchofJesusChrist.org
  Subject: Re: archive_commnad parameter question
  In-Reply-To: <38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.com>
  References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com> <38a9c7ef-a301-39b9-3766-85f67a6c4e17@aklaver.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