Skip site navigation (1) Skip section navigation (2)

BUG #3877: Doc Clarification: archive_command and restore_command replacements

From: "Kevin Hunt" <kevin(at)centropy(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3877: Doc Clarification: archive_command and restore_command replacements
Date: 2008-01-15 19:12:17
Message-ID: 200801151912.m0FJCHBV019540@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3877
Logged by:          Kevin Hunt
Email address:      kevin(at)centropy(dot)com
PostgreSQL version: 8.2.6
Operating system:   n/a
Description:        Doc Clarification: archive_command and restore_command
replacements
Details: 

When describing archive_command and restore_command (Chapter 23 - Backup and
Restore), the replacement strings '%p' and '%f' are explained:

"In this string, any %p is replaced by the path name of the file to archive,
while any %f is replaced by the file name only."

The description of %p is misleading since it is replaced with not just the
path, but also filename. The way it is written now, one might expect the
string "%p/%f" to resolve to the full path and filename of the file.
However, "%p" is sufficient.

A small change in the sentence would clarify:
"In this string, any %p is replaced by the full path and file name of the
file to archive, while any %f is replaced by the file name only."

An example showing how the sample commands would be expanded would also
help:

---
The simplest useful command is something like
archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'

The above example might be expanded to
cp -i /var/lib/postgresql/8.2/main/pgdata/pg_xlog/00000001000000A900000065
/mnt/server/archivedir/00000001000000A900000065 </dev/null

Responses

pgsql-bugs by date

Next:From: J6MDate: 2008-01-15 19:21:35
Subject: Re: BUG #3876: Problems migrating databases
Previous:From: Ruben Camargo GomezDate: 2008-01-15 16:52:13
Subject: BUG #3876: Problems migrating databases

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group