From 780f50dae9b83704471d77f5d9e79a0ab950c6d3 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 15 Dec 2007 15:41:02 +0000 Subject: [PATCH] Fix example archive_command for standalone backups so it doesn't return spurious non-zero. --- doc/src/sgml/backup.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index ab0ef35e08..4fede11635 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1,4 +1,4 @@ - + Backup and Restore @@ -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. -archive_command = 'test -f /var/lib/pgsql/backup_in_progress && cp -i %p /var/lib/pgsql/archive/%f </dev/null' +archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f </dev/null ; fi' Backup can then be taken using a script like the following: