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