Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 31e8ab4

Browse files
committed
Fix missed use of "cp -i" in an example, per Fujii Masao.
Also be more careful about markup: use & not just &.
1 parent cd1f0d0 commit 31e8ab4

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
@@ -579,7 +579,7 @@ tar -cf backup.tar /usr/local/pgsql/data
579579
character in the command. The simplest useful command is something
580580
like:
581581
<programlisting>
582-
archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' # Unix
582+
archive_command = 'test ! -f /mnt/server/archivedir/%f &amp;&amp; cp %p /mnt/server/archivedir/%f' # Unix
583583
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
584584
</programlisting>
585585
which will copy archivable WAL segments to the directory
@@ -1213,7 +1213,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
12131213
<literal>on</>, and set up an <varname>archive_command</> that performs
12141214
archiving only when a <emphasis>switch file</> exists. For example:
12151215
<programlisting>
1216-
archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f &lt; /dev/null'
1216+
archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f &amp;&amp; cp %p /var/lib/pgsql/archive/%f)'
12171217
</programlisting>
12181218
This command will perform archiving when
12191219
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise

0 commit comments

Comments
 (0)