From 1570d0467af81e652e2e9f89ba6c8508cc118255 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 23 Jan 2008 20:21:37 +0000 Subject: [PATCH] Provide a concrete example of parameter expansion in archive_command. Per discussion of bug #3877. Simon Riggs, some fixes by moi. --- doc/src/sgml/backup.sgml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 7cae1424795..6252159025f 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1,4 +1,4 @@ - + Backup and Restore @@ -64,7 +64,7 @@ pg_dump dbname > - As any other PostgreSQL client application, + Like any other PostgreSQL client application, pg_dump will by default connect with the database user name that is equal to the current operating system user name. To override this, either specify the option or set the @@ -407,7 +407,7 @@ tar -cf backup.tar /usr/local/pgsql/data smaller than an SQL dump. On the contrary, it will most likely be larger. (pg_dump does not need to dump the contents of indexes for example, just the commands to recreate - them.) + them.) However, taking a file system backup might be faster. @@ -556,7 +556,13 @@ archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null' which will copy archivable WAL segments to the directory /mnt/server/archivedir. (This is an example, not a - recommendation, and might not work on all platforms.) + recommendation, and might not work on all platforms.) After the + %p and %f parameters have been replaced, + the actual command executed might look like this: + +cp -i pg_xlog/00000001000000A900000065 /mnt/server/archivedir/00000001000000A900000065 </dev/null + + A similar command will be generated for each new file to be archived. -- 2.39.5