Re: archive_commnad parameter question - Mailing list pgsql-general

From Alan Hodgson
Subject Re: archive_commnad parameter question
Date
Msg-id 95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca
Whole thread Raw
In response to archive_commnad parameter question  (Allie Crawford <CrawfordMA@ChurchofJesusChrist.org>)
List pgsql-general
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. 

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: archive_commnad parameter question
Next
From: "Podrigal, Aron"
Date:
Subject: Alter generated column expression