mirror of
https://github.com/postgres/postgres.git
synced 2025-05-15 00:02:24 -04:00
Fix missed use of "cp -i" in an example, per Fujii Masao.
Also be more careful about markup: use & not just &.
This commit is contained in:
parent
23843d242f
commit
4ce6714970
@ -552,7 +552,7 @@ tar -cf backup.tar /usr/local/pgsql/data
|
|||||||
character in the command. The simplest useful command is something
|
character in the command. The simplest useful command is something
|
||||||
like:
|
like:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
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
|
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
|
||||||
</programlisting>
|
</programlisting>
|
||||||
which will copy archivable WAL segments to the directory
|
which will copy archivable WAL segments to the directory
|
||||||
@ -1299,7 +1299,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
|
|||||||
<literal>on</>, and set up an <varname>archive_command</> that performs
|
<literal>on</>, and set up an <varname>archive_command</> that performs
|
||||||
archiving only when a <quote>switch file</> exists. For example:
|
archiving only when a <quote>switch file</> exists. For example:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
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)'
|
||||||
</programlisting>
|
</programlisting>
|
||||||
This command will perform archiving when
|
This command will perform archiving when
|
||||||
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise
|
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user