Fix missed use of "cp -i" in an example, per Fujii Masao.
authorTom Lane
Mon, 20 Jun 2011 20:27:32 +0000 (16:27 -0400)
committerTom Lane
Mon, 20 Jun 2011 20:27:32 +0000 (16:27 -0400)
Also be more careful about markup: use & not just &.

doc/src/sgml/backup.sgml

index bdffb4b859ed2f0c79f7a2f8feb36c33e90b07dd..b8daedcbb6e42241ad987fddcdec8310a731423e 100644 (file)
@@ -579,7 +579,7 @@ tar -cf backup.tar /usr/local/pgsql/data
     character in the command.  The simplest useful command is something
     like:
 
-archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'  # Unix
+archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'  # Unix
 archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"'  # Windows
 
     which will copy archivable WAL segments to the directory
@@ -1213,7 +1213,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
       on, and set up an archive_command that performs
       archiving only when a switch file exists.  For example:
 
-archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f < /dev/null'
+archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f && cp %p /var/lib/pgsql/archive/%f)'
 
       This command will perform archiving when
       /var/lib/pgsql/backup_in_progress exists, and otherwise