Skip to content

Commit 4ce6714

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 23843d2 commit 4ce6714

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
@@ -552,7 +552,7 @@ tar -cf backup.tar /usr/local/pgsql/data
552552
character in the command. The simplest useful command is something
553553
like:
554554
<programlisting>
555-
archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' # Unix
555+
archive_command = 'test ! -f /mnt/server/archivedir/%f &amp;&amp; cp %p /mnt/server/archivedir/%f' # Unix
556556
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
557557
</programlisting>
558558
which will copy archivable WAL segments to the directory
@@ -1299,7 +1299,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
12991299
<literal>on</>, and set up an <varname>archive_command</> that performs
13001300
archiving only when a <quote>switch file</> exists. For example:
13011301
<programlisting>
1302-
archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f &lt; /dev/null'
1302+
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)'
13031303
</programlisting>
13041304
This command will perform archiving when
13051305
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise

0 commit comments

Comments
 (0)