Skip to content

Commit 780f50d

Browse files
committed
Fix example archive_command for standalone backups so it doesn't return spurious non-zero.
1 parent d54ce51 commit 780f50d

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.109 2007/11/28 22:35:54 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.110 2007/12/15 15:41:02 adunstan Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -1257,7 +1257,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
12571257
To configure standalone backups you should use a switch file. If the
12581258
file exists then archives are made, otherwise archiving is ignored.
12591259
<programlisting>
1260-
archive_command = 'test -f /var/lib/pgsql/backup_in_progress &amp;&amp; cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null'
1260+
archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f &lt;/dev/null ; fi'
12611261
</programlisting>
12621262
Backup can then be taken using a script like the following:
12631263
<programlisting>

0 commit comments

Comments
 (0)