@ -627,7 +627,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
@ -1294,7 +1294,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
character in the command. The simplest useful command is
character in the command. The simplest useful command is
something like:
something like:
<programlisting>
<programlisting>
restore_command = 'cp /mnt/server/archivedir/%f %p'
restore_command = 'cp " /mnt/server/archivedir/%f" " %p" '
</programlisting>
</programlisting>
which will copy previously archived WAL segments from the directory
which will copy previously archived WAL segments from the directory
<filename>/mnt/server/archivedir</filename>. Of course, you can use something
<filename>/mnt/server/archivedir</filename>. Of course, you can use something
@ -1493,11 +1493,11 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
If archive storage size is a concern, you can use
If archive storage size is a concern, you can use
<application>gzip</application> to compress the archive files:
<application>gzip</application> to compress the archive files:
<programlisting>
<programlisting>
archive_command = 'gzip < %p > /mnt/server/archivedir/%f.gz'
archive_command = 'gzip < " %p" > " /mnt/server/archivedir/%f.gz" '
</programlisting>
</programlisting>
You will then need to use <application>gunzip</application> during recovery:
You will then need to use <application>gunzip</application> during recovery:
<programlisting>
<programlisting>
restore_command = 'gunzip < /mnt/server/archivedir/%f.gz > %p'
restore_command = 'gunzip < " /mnt/server/archivedir/%f.gz" > " %p" '
</programlisting>
</programlisting>
</para>
</para>
</sect3>
</sect3>