Skip to content

Commit 1570d04

Browse files
committed
Provide a concrete example of parameter expansion in archive_command.
Per discussion of bug #3877. Simon Riggs, some fixes by moi.
1 parent 216e63b commit 1570d04

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

doc/src/sgml/backup.sgml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.112 2007/12/17 09:03:52 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.113 2008/01/23 20:21:37 tgl Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -64,7 +64,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
6464
</para>
6565

6666
<para>
67-
As any other <productname>PostgreSQL</> client application,
67+
Like any other <productname>PostgreSQL</> client application,
6868
<application>pg_dump</> will by default connect with the database
6969
user name that is equal to the current operating system user name. To override
7070
this, either specify the <option>-U</option> option or set the
@@ -407,7 +407,7 @@ tar -cf backup.tar /usr/local/pgsql/data
407407
smaller than an SQL dump. On the contrary, it will most likely be
408408
larger. (<application>pg_dump</application> does not need to dump
409409
the contents of indexes for example, just the commands to recreate
410-
them.)
410+
them.) However, taking a file system backup might be faster.
411411
</para>
412412
</sect1>
413413

@@ -556,7 +556,13 @@ archive_command = 'cp -i %p /mnt/server/archivedir/%f &lt;/dev/null'
556556
</programlisting>
557557
which will copy archivable WAL segments to the directory
558558
<filename>/mnt/server/archivedir</>. (This is an example, not a
559-
recommendation, and might not work on all platforms.)
559+
recommendation, and might not work on all platforms.) After the
560+
<literal>%p</> and <literal>%f</> parameters have been replaced,
561+
the actual command executed might look like this:
562+
<programlisting>
563+
cp -i pg_xlog/00000001000000A900000065 /mnt/server/archivedir/00000001000000A900000065 &lt;/dev/null
564+
</programlisting>
565+
A similar command will be generated for each new file to be archived.
560566
</para>
561567

562568
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy