Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1570d04

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 parent216e63b commit1570d04

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)

[8]ページ先頭

©2009-2025 Movatter.jp