pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Hodgson <ahodgson@lists.simkin.ca>
To: pgsql-general@lists.postgresql.org
Subject: Re: archive_commnad parameter question
Date: Mon, 19 Apr 2021 14:19:38 -0700
Message-ID: <95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca> (raw)
In-Reply-To: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>
References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com>

On Mon, 2021-04-19 at 21:09 +0000, 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?

'test' in this case is an actual executable present on many Unix and Unix-like
systems.

In this case it effectively gates the copy (cp) command so that it only runs
if the target file does not already exist. 

view thread (5+ messages)

Message-ID: <95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca>
Permalink:  ../95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca/
Also on:    postgresql.org/message-id/95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca

 · 

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: ahodgson@lists.simkin.ca
  Subject: Re: archive_commnad parameter question
  In-Reply-To: <95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca>
  References: <CY4PR04MB04704227BFE53F5C5E799748D9499@CY4PR04MB0470.namprd04.prod.outlook.com> <95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca>

* 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