aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-12-17 09:03:52 +0000
committerBruce Momjian <bruce@momjian.us>2007-12-17 09:03:52 +0000
commit3791d26d4b6f2080d5e1fd1a008249f8ece29f6e (patch)
treedac127ab2d8b577e5465a60b97c9db6f19cc4ab4
parent8e179aeb9e7ed03535c40a9a609a704852f0d5d0 (diff)
downloadpostgresql-3791d26d4b6f2080d5e1fd1a008249f8ece29f6e.tar.gz
postgresql-3791d26d4b6f2080d5e1fd1a008249f8ece29f6e.zip
Update archive_command example to use || test, rather than if [].
-rw-r--r--doc/src/sgml/backup.sgml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index c31b7e31e78..7cae1424795 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.111 2007/12/17 04:30:05 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.112 2007/12/17 09:03:52 momjian Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
@@ -1290,7 +1290,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
<literal>on</>, and set up an <varname>archive_command</> that performs
archiving only when a <quote>switch file</> exists. For example:
<programlisting>
-archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null ; fi'
+archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f &lt; /dev/null'
</programlisting>
This command will perform archiving when
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise