Skip to content

Commit 3791d26

Browse files
committed
Update archive_command example to use || test, rather than if [].
1 parent 8e179ae commit 3791d26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/src/sgml/backup.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.111 2007/12/17 04:30:05 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.112 2007/12/17 09:03:52 momjian Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -1290,7 +1290,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
12901290
<literal>on</>, and set up an <varname>archive_command</> that performs
12911291
archiving only when a <quote>switch file</> exists. For example:
12921292
<programlisting>
1293-
archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null ; fi'
1293+
archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f &lt; /dev/null'
12941294
</programlisting>
12951295
This command will perform archiving when
12961296
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy