提交 780f50da 编写于 作者: A Andrew Dunstan

Fix example archive_command for standalone backups so it doesn't return spurious non-zero.

上级 d54ce518
<!-- $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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册