Update archive_command example to use || test, rather than if [].
authorBruce Momjian
Mon, 17 Dec 2007 09:03:52 +0000 (09:03 +0000)
committerBruce Momjian
Mon, 17 Dec 2007 09:03:52 +0000 (09:03 +0000)
doc/src/sgml/backup.sgml

index c31b7e31e7898d141a1a2dd92688c71f449a4512..7cae1424795a069b1d848fb6429b253ed823c690 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Backup and Restore
@@ -1290,7 +1290,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"'  # Windows
       on, and set up an archive_command that performs
       archiving only when a switch file exists.  For example:
 
-archive_command = 'if [ -f /var/lib/pgsql/backup_in_progress ]; then cp -i %p /var/lib/pgsql/archive/%f </dev/null ; fi'
+archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f < /dev/null'
 
       This command will perform archiving when
       /var/lib/pgsql/backup_in_progress exists, and otherwise