summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAndrew Dunstan2007-12-15 15:41:02 +0000
committerAndrew Dunstan2007-12-15 15:41:02 +0000
commit780f50dae9b83704471d77f5d9e79a0ab950c6d3 (patch)
tree7419f267bf88e8d167dbd27810fd05f3ca25905d /doc/src
parentd54ce518b32b2b0ef15955a72ef1105c818420d0 (diff)
Fix example archive_command for standalone backups so it doesn't return spurious non-zero.
Diffstat (limited to 'doc/src')
-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 ab0ef35e08f..4fede116356 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.109 2007/11/28 22:35:54 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.110 2007/12/15 15:41:02 adunstan Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
@@ -1257,7 +1257,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
To configure standalone backups you should use a switch file. If the
file exists then archives are made, otherwise archiving is ignored.
<programlisting>
-archive_command = 'test -f /var/lib/pgsql/backup_in_progress &amp;&amp; cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null'
+archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null ; fi'
</programlisting>
Backup can then be taken using a script like the following:
<programlisting>