File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -577,7 +577,7 @@ tar -cf backup.tar /usr/local/pgsql/data
577
577
character in the command. The simplest useful command is something
578
578
like:
579
579
<programlisting>
580
- archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' # Unix
580
+ archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' # Unix
581
581
archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows
582
582
</programlisting>
583
583
which will copy archivable WAL segments to the directory
@@ -1199,7 +1199,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
1199
1199
<literal>on</>, and set up an <varname>archive_command</> that performs
1200
1200
archiving only when a <emphasis>switch file</> exists. For example:
1201
1201
<programlisting>
1202
- archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp -i %p /var/lib/pgsql/archive/%f < /dev/null '
1202
+ archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f && cp %p /var/lib/pgsql/archive/%f) '
1203
1203
</programlisting>
1204
1204
This command will perform archiving when
1205
1205
<filename>/var/lib/pgsql/backup_in_progress</> exists, and otherwise
You can’t perform that action at this time.
0 commit comments