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.