Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbJ6-00089r-J4 for pgsql-general@arkaria.postgresql.org; Mon, 19 Apr 2021 21:19:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYbJ5-0000lh-Dk for pgsql-general@arkaria.postgresql.org; Mon, 19 Apr 2021 21:19:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbJ5-0000lZ-05 for pgsql-general@lists.postgresql.org; Mon, 19 Apr 2021 21:19:47 +0000 Received: from outbound2n.ore.mailhop.org ([54.186.218.12]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbJ2-0000eZ-GO for pgsql-general@lists.postgresql.org; Mon, 19 Apr 2021 21:19:46 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1618867182; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=nM6jkkgKbmO2nBiHuuNgZ2VVG1UxoZjkhJl9AxW49VjwbfwoOjBFVBns6Iyuvov3IdIOIffAmdhI1 Ici3BuGsdgjbW6v9B8TRW/TiT3Dh9stO722mcHdNQqvootSGAp4eGmY0rgK8DCqTxmzuVQFGEI109F 5lVWTw8AnZHT92UdlPdwWIyZ8l3/uc3Zn8i8s9YryvqkxbvpjgQ04mnUqbp3Y9LH0iQocuvGLu7Wok ub6AYuU0lAkqiA7wtSIBJt43BxCwz8/4y+R/5wVarrlOUqi+v6O3GkHjkafdCQ9ryFtOjv8sZ9c0Fc JA74jglINZfGm9pHLLi8OVE6IaEea0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:dkim-signature:dkim-signature:dkim-signature:from; bh=iCqUQtQW5zAvte6KXONBlk4xuLewaHO2oI2LrNvB0nU=; b=YCW0N98wCu18rPPqCQRjh7qVdTjJXRXsI1XxzqjaUjikBq25k4aKPMiedsJ7zZoz5i5c3BSA1W7XR XMglD7a/Cd/XZStHrUh80MS9M+HvzpZxFxmLlrtbXIjTgAFEB/Q/H6Kr9Y6GRdRuj3qGY4O/c2+rn9 8oEKChnZuAvWzYM7eZgXK/T+DOZ/x2IJaTHyL2i0VkSiAdiY7SfU0LZlfEuCksYRtzlP3iM/tv/QyC PMo5xTte4lakmD2taT8VMQiHHEe8QkiKKcpFuVQPSU0qqRxTsCdIQ7KaReGqLEOj1jvpzLp+iAt7xI Vu6YO8XJYFwnbl7Ayd06DUJdi828u6Q== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=pass smtp.mailfrom=lists.simkin.ca smtp.remote-ip=74.50.227.220; dkim=pass header.d=lists.simkin.ca header.s=athena header.a=rsa-sha256 header.b=jK/M5tTl; dmarc=pass header.from=lists.simkin.ca; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.simkin.ca; s=duo-1610662143981-d3c4c825; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:from; bh=iCqUQtQW5zAvte6KXONBlk4xuLewaHO2oI2LrNvB0nU=; b=rkjJIGlDIvn3+UYNb5hbdq23C8dPjS0dYhkJiNlike96giSv5eNLPAhjxsmrFeHzF0j7NxtPtEcEI 3iStQXqHXSqaa0Jl0CyvV4jm/mLpDTdKE5iu+O9Q+xiFFKYjYFPZNCN+TuCChJ51wdFPQwZyDx7WwN g+aFyynrOMBinZhw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=mime-version:content-type:references:in-reply-to:date:to:from:subject: message-id:from; bh=iCqUQtQW5zAvte6KXONBlk4xuLewaHO2oI2LrNvB0nU=; b=rQWfTK1JbChgjXo+IuANmAasAc6ePfapSm/V7osr7PIU4ICVhEqY/wDL0uCZ+iRfi3H+u5GLt+szY mYG5Mjadju1PcjdtI7tuu6TcU9L6MJmXrJ3dkSUvpH963SdQd/iHPeNXOTGQ7XkD8aV65Ckk1OcUtr tRRO388r+V5mN2yeg0f/DnwG2Wf4pJeLcjNjP33rU9SHmJVjSukZU1S55OquFjVGcSgzdRgQcYYWSe GgERWpk2aT21zJhe4/c4pBbsnYhJXnEko1K3pojX87Lxy+TsWiTxVBdUKny1bczJmhVnUa8gwGVVWX DbmU3gPZfI2RRQJZW5OL8PKDJrTWpFw== X-Originating-IP: 74.50.227.220 X-MHO-RoutePath: c2lta2lu X-MHO-User: f3c95101-a154-11eb-a651-89389772cfc7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from athena.simkin.ca (athena.simkin.ca [74.50.227.220]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id f3c95101-a154-11eb-a651-89389772cfc7; Mon, 19 Apr 2021 21:19:41 +0000 (UTC) Received: from skynet.simkin.ca (node-1w7jr9sr73xr4ze19xwgjcteu.ipv6.telus.net [IPv6:2001:569:bce0:6400:fa75:a4ff:fe2f:92e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id 45435DC6970A for ; Mon, 19 Apr 2021 14:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1618867180; bh=3eg7dnY98wBLze5vw5mVBitBS3l0NccE7o3/pNYYER4=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=jK/M5tTlizLQb094fIEcqjbdX6vu9vZ37zrEUMUtP+pO18SEWao3VZliOE9irFgSS pq6/Hr0kj9lW3LaVKh9jtLIQs2juWIbctJ3AiPANF+qeHnIHMsxlIv6CzVmol1sPp4 uhVl0gHlTMh3vydefV4YyCk79fcMYd3rGECediLCcI31MjZCxPDvxvL0YSLCFPrztl +Nd0ajQrMVFS9ARypxC55ZrVn0vH7b+aaadRAwh5yTERkg4SNPCs3ByDRPknsLRdBk 44TASUQ9wax2eGS36Ci3lMoa2FIPmti7+ET4oSmE+b5fFA51nNI4igN46+Jnkg8p8c uGC9vdZNYHndA== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id 11421105B1B11 for ; Mon, 19 Apr 2021 14:19:38 -0700 (PDT) Message-ID: <95d35a2605b2b0257043e4cf0ac6be6953aae10f.camel@lists.simkin.ca> Subject: Re: archive_commnad parameter question From: Alan Hodgson To: pgsql-general@lists.postgresql.org Date: Mon, 19 Apr 2021 14:19:38 -0700 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-U//rmxCQMK9loGJcdwlQ" X-PGP-Key: fp="EF82 6F8D A3BA A096 FFA3 05F2 A7A0 40A5 34E5 AA0B"; id="0x34E5AA0B"; get= User-Agent: Evolution 3.38.4 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-U//rmxCQMK9loGJcdwlQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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.  --=-U//rmxCQMK9loGJcdwlQ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Mon, 2021-04-19 at 21:09 +0000, Allie Crawford wrote:

Hello,

I am new in PostgreSQL a= nd I am trying to understand what the =E2=80=9Ctest=E2=80=9D word is repres= enting in the archive_command configuration that the PostgreSQL documentati= on is showing as the format on how to set up this parameter

<= p class=3D"MsoNormal"> 

ar= chive_command =3D 'test ! -f /mnt/server/archivedir/%f && cp %p /mn= t/server/archivedir/%f'  # Unix

 

Does anybody know w= hat is =E2=80=9Ctest=E2=80=9D representing in this parameter configuration?=


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

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

--=-U//rmxCQMK9loGJcdwlQ--