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 1lYbIE-00087p-HW for pgsql-general@arkaria.postgresql.org; Mon, 19 Apr 2021 21:18:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYbID-0006DM-GZ for pgsql-general@arkaria.postgresql.org; Mon, 19 Apr 2021 21:18:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbID-0006DC-98 for pgsql-general@lists.postgresql.org; Mon, 19 Apr 2021 21:18:53 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbI8-0007R2-3g for pgsql-general@lists.postgresql.org; Mon, 19 Apr 2021 21:18:52 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 43188498F; Mon, 19 Apr 2021 23:18:45 +0200 (CEST) Date: Mon, 19 Apr 2021 23:18:45 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: archive_commnad parameter question Message-ID: <20210419211845.GA31797@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-04-19 21:09:13 +0000, Allie Crawford wrote: > I am new in PostgreSQL and I am trying to understand what the =E2=80=9Cte= st=E2=80=9D word is > representing in the archive_command configuration that the PostgreSQL > documentation is showing as the format on how to set up this parameter >=20 > archive_command =3D 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/se= rver/ > archivedir/%f' # Unix >=20 > Does anybody know what is =E2=80=9Ctest=E2=80=9D representing in this par= ameter configuration? "test" is a unix command for testing stuff (as the name implies). "test -f" in particular tests whether the argument exists and is a regular file) and the "!" inverts the result. So the whole line checks that the target *doesn't* already exist before attempting to copy over it. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmB987UACgkQ8g5IURL+ KF0h+Q/+NlyCkeh6HSI4BNbhRxuuFPvnmMJvnDRYcaQBO4fGgrsUW6IKQTK3Eqvi Be2/uwYPXC28XDYmgmpOHMboldZ5eq3w7ZTDJAtJ9wEjVPDCOWflkYNRtX8Aggbm Ed2a3rvr0ToyAh+KH+UGkZuIW4EmAT9JkVyrnb3CIYTZ+PQlP6lU7bKz2Nnkr4sx 8UQ2PE8EL3T+GvsuupQF6TNjUQSPGW4jBND97ZhtRUnAzY4vn6iyunvXlcKFPZYk YOXtEA9ETjq+2XIXFQTl6VzSyDSAftfI7ZzD1UAeLGKkUD83ZMLBp/I7828zwhHf ZwJ9bC4EZW/6gi3RQNLMChvNxr7tC+gQ8P8VBYfNFv4X8mLHZoWdub+rbknrf/kY cQN+4vTPyHuQyz0B1p3qu5wQifAXGk17THBi3CmaC5q8uuRJxzJ6+N7DIFxJ6Zfj g5Sdnwu7WemOaWqX57aPUHc+JT6aFl12gkc6WbQBf8Zj4C7Zn3kBNJyIJzIj+NJJ XLJC++TPqwij67PBhaXBoz2h3bz20T/Oq/KEGcJuoiOmY0aZXx7WPHfY6EaVJ2JB M7idYjPS1bPS3PmOji5bhcoJaRqapMKvS2mCRRPAx3HHOByAxgI1mD9YKCCno0/Q JxI5VFVE+NKSXTq9zQqNzxmAyi+iYPW09SxA5F3pD40+BuX2aog= =6/xX -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--