pgbackrest.git / summary / log / commit / refs
commit bb443dd098140e07d8ceddc56673b45f303c748d
Author: David Steele <david@pgmasters.net>
Date: Mon Jul 06 21:59:44 2015 +0000
Renamed pg_backrest.pl to pg_backrest in the docs.
README.md | 20 ++++++++++----------
doc/doc.dtd | 8 +++++---
doc/doc.pl | 10 +++++++---
doc/doc.xml | 20 ++++++++++----------
4 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/README.md b/README.md
index e0f9e0225..1132b7f68 100644
--- a/README.md
+++ b/README.md
@@ -232,7 +232,7 @@ default: n
##### Example: Full Backup
```
-/path/to/pg_backrest.pl --stanza=db --type=full backup
+/path/to/pg_backrest --stanza=db --type=full backup
```
Run a `full` backup on the `db` stanza. `--type` can also be set to `incr` or `diff` for incremental or differential backups. However, if no `full` backup exists then a `full` backup will be forced even if `incr` or `diff` is requested.
@@ -243,9 +243,9 @@ Archive a WAL segment to the repository.
##### Example
```
-/path/to/pg_backrest.pl --stanza=db archive-push %p
+/path/to/pg_backrest --stanza=db archive-push %p
```
-Accepts a WAL segment from PostgreSQL and archives it in the repository. `%p` is how PostgreSQL specifies the location of the WAL segment to be archived.
+Accepts a WAL segment from PostgreSQL and archives it in the repository defined by `repo-path`. `%p` is how PostgreSQL specifies the location of the WAL segment to be archived.
#### `archive-get` command
@@ -254,7 +254,7 @@ Get a WAL segment from the repository.
##### Example
```
-/path/to/pg_backrest.pl --stanza=db archive-get %f %p
+/path/to/pg_backrest --stanza=db archive-get %f %p
```
Retrieves a WAL segment from the repository. This command is used in `recovery.conf` to restore a backup, perform PITR, or as an alternative to streaming for keeping a replica up to date. `%f` is how PostgreSQL specifies the WAL segment it needs and `%p` is the location where it should be copied.
@@ -265,7 +265,7 @@ pgBackRest does backup rotation, but is not concerned with when the backups were
##### Example
```
-/path/to/pg_backrest.pl --stanza=db expire
+/path/to/pg_backrest --stanza=db expire
```
Expire (rotate) any backups that exceed the defined retention. Expiration is run automatically after every successful backup, so there is no need to run this command separately unless you have reduced retention, usually to free up some space.
@@ -378,7 +378,7 @@ example: --tablespace-map ts_01=/db/ts_01
##### Example: Restore Latest
```
-/path/to/pg_backrest.pl --stanza=db --type=name --target=release restore
+/path/to/pg_backrest --stanza=db --type=name --target=release restore
```
Restores the latest database backup and then recovers to the `release` restore point.
@@ -404,7 +404,7 @@ example: --output=json
##### Example: Backup information
```
-/path/to/pg_backrest.pl --stanza=db --output=json info
+/path/to/pg_backrest --stanza=db --output=json info
```
Get information about backups in the `db` stanza.
@@ -421,7 +421,7 @@ Modify the following settings in `postgresql.conf`:
```
wal_level = archive
archive_mode = on
-archive_command = '/path/to/backrest/bin/pg_backrest.pl --stanza=db archive-push %p'
+archive_command = '/path/to/backrest/bin/pg_backrest --stanza=db archive-push %p'
```
Replace the path with the actual location where pgBackRest was installed. The stanza parameter should be changed to the actual stanza name for your database.
@@ -475,7 +475,7 @@ cmd-psql-option=--port=5433
#### Simple Multiple Host Configuration
-This configuration is appropriate for a small installation where backups are being made remotely. Make sure that postgres@db-host has trusted ssh to backrest@backup-host and vice versa. This configuration assumes that you have pg_backrest_remote.pl and pg_backrest.pl in the same path on both servers.
+This configuration is appropriate for a small installation where backups are being made remotely. Make sure that postgres@db-host has trusted ssh to backrest@backup-host and vice versa. This configuration assumes that you have pg_backrest in the same path on both servers.
`/etc/pg_backrest.conf` on the db host:
```
@@ -843,7 +843,7 @@ example: db-path=/data/db
### v0.80: DALLAS MILESTONE - UNDER DEVELOPMENT
-*
+*
### v0.77: CentOS/RHEL 6 support and protocol improvements
diff --git a/doc/doc.dtd b/doc/doc.dtd
index 9532b9bc1..540f83073 100644
--- a/doc/doc.dtd
+++ b/doc/doc.dtd
@@ -1,5 +1,6 @@
<!ELEMENT doc (intro, install, operation, config, release, recognition)>
<!ATTLIST doc title CDATA #REQUIRED>
+ <!ATTLIST doc exe CDATA #REQUIRED>
<!ATTLIST doc subtitle CDATA #REQUIRED>
<!ELEMENT intro (text)>
@@ -75,20 +76,21 @@
<!ELEMENT recognition (text)>
<!ATTLIST recognition title CDATA #REQUIRED>
-<!ELEMENT text (#PCDATA|b|i|bi|ul|ol|id|code|code-block|file|path|cmd|param|setting|backrest|postgres)*>
+<!ELEMENT text (#PCDATA|b|i|bi|ul|ol|id|code|code-block|file|path|cmd|param|setting|exe|backrest|postgres)*>
<!ELEMENT i (#PCDATA)>
<!ELEMENT b (#PCDATA)>
<!ELEMENT bi (#PCDATA)>
<!ELEMENT ul (li+)>
<!ELEMENT ol (li+)>
-<!ELEMENT li (#PCDATA|b|i|bi|ul|ol|id|code|code-block|file|path|cmd|param|setting|backrest|postgres)*>
+<!ELEMENT li (#PCDATA|b|i|bi|ul|ol|id|code|code-block|file|path|cmd|param|setting|exe|backrest|postgres)*>
<!ELEMENT id (#PCDATA)>
<!ELEMENT code (#PCDATA)>
-<!ELEMENT code-block (#PCDATA)>
+<!ELEMENT code-block (#PCDATA|exe)*>
<!ELEMENT file (#PCDATA)>
<!ELEMENT path (#PCDATA)>
<!ELEMENT cmd (#PCDATA)>
<!ELEMENT param (#PCDATA)>
<!ELEMENT setting (#PCDATA)>
+<!ELEMENT exe EMPTY>
<!ELEMENT backrest EMPTY>
<!ELEMENT postgres EMPTY>
diff --git a/doc/doc.pl b/doc/doc.pl
index d6cb1a9ba..618d62db5 100755
--- a/doc/doc.pl
+++ b/doc/doc.pl
@@ -10,6 +10,8 @@ use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
+$SIG{__DIE__} = sub { Carp::confess @_ };
+
use File::Basename qw(dirname);
use Pod::Usage qw(pod2usage);
use Getopt::Long qw(GetOptions);
@@ -57,6 +59,7 @@ my $oRenderTag =
'setting' => ['`', '`'],
'code' => ['`', '`'],
'code-block' => ['```', '```'],
+ 'exe' => ['ERROR - EXE NOT SET', ''],
'backrest' => ['ERROR - TITLE NOT SET', ''],
'postgres' => ['PostgreSQL', '']
},
@@ -85,7 +88,7 @@ sub doc_render_tag
$strBuffer .= $strStart;
- if ($strTag eq 'li')
+ if ($strTag eq 'li' || $strTag eq 'code-block')
{
$strBuffer .= doc_render_text($oTag, $strType);
}
@@ -241,7 +244,7 @@ sub doc_parse
my %oOut;
my $iIndex = 0;
- my $bText = $strName eq 'text' || $strName eq 'li';
+ my $bText = $strName eq 'text' || $strName eq 'li' || $strName eq 'code-block';
# Store the node name
$oOut{name} = $strName;
@@ -434,7 +437,7 @@ sub doc_build
my $oSub = $$oDoc{children}[$iIndex];
my $strName = $$oSub{name};
- if ($strName eq 'text')
+ if ($strName eq 'text' || $strName eq 'code-block')
{
$$oOut{field}{text} = $oSub;
}
@@ -637,6 +640,7 @@ sub doc_render
if ($iDepth == 1)
{
$$oRenderTag{'markdown'}{'backrest'}[0] = $$oDoc{param}{title};
+ $$oRenderTag{'markdown'}{'exe'}[0] = $$oDoc{param}{exe};
}
$strBuffer = ('#' x $iDepth) . ' ';
diff --git a/doc/doc.xml b/doc/doc.xml
index e14dcd653..165f15631 100644
--- a/doc/doc.xml
+++ b/doc/doc.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc SYSTEM "doc.dtd">
-<doc title="pgBackRest" subtitle="Simple Postgres Backup & Restore">
+<doc title="pgBackRest" exe="pg_backrest" subtitle="Simple Postgres Backup & Restore">
<intro>
<text><backrest/> aims to be a simple backup and restore system that can seamlessly scale up to the largest databases and workloads.
@@ -221,7 +221,7 @@ Examples of how to configure a stanza can be found in the `configuration example
<command-example-list>
<command-example title="Full Backup">
<text><code-block>
-/path/to/pg_backrest.pl --stanza=db --type=full backup
+/path/to/<exe/> --stanza=db --type=full backup
</code-block>
Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can also be set to <id>incr</id> or <id>diff</id> for incremental or differential backups. However, if no <id>full</id> backup exists then a <id>full</id> backup will be forced even if <id>incr</id> or <id>diff</id> is requested.</text>
</command-example>
@@ -235,9 +235,9 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<command-example-list>
<command-example>
<text><code-block>
- /path/to/pg_backrest.pl --stanza=db archive-push %p
+ /path/to/<exe/> --stanza=db archive-push %p
</code-block>
- Accepts a WAL segment from <postgres/> and archives it in the repository. <param>%p</param> is how <postgres/> specifies the location of the WAL segment to be archived.</text>
+ Accepts a WAL segment from <postgres/> and archives it in the repository defined by <setting>repo-path</setting>. <param>%p</param> is how <postgres/> specifies the location of the WAL segment to be archived.</text>
</command-example>
</command-example-list>
</command>
@@ -249,7 +249,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<command-example-list>
<command-example>
<text><code-block>
- /path/to/pg_backrest.pl --stanza=db archive-get %f %p
+ /path/to/<exe/> --stanza=db archive-get %f %p
</code-block>
Retrieves a WAL segment from the repository. This command is used in <file>recovery.conf</file> to restore a backup, perform PITR, or as an alternative to streaming for keeping a replica up to date. <param>%f</param> is how <postgres/> specifies the WAL segment it needs and <param>%p</param> is the location where it should be copied.</text>
</command-example>
@@ -263,7 +263,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<command-example-list>
<command-example>
<text><code-block>
- /path/to/pg_backrest.pl --stanza=db expire
+ /path/to/<exe/> --stanza=db expire
</code-block>
Expire (rotate) any backups that exceed the defined retention. Expiration is run automatically after every successful backup, so there is no need to run this command separately unless you have reduced retention, usually to free up some space.</text>
</command-example>
@@ -354,7 +354,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<command-example-list>
<command-example title="Restore Latest">
<text><code-block>
- /path/to/pg_backrest.pl --stanza=db --type=name --target=release restore
+ /path/to/<exe/> --stanza=db --type=name --target=release restore
</code-block>
Restores the latest database backup and then recovers to the <id>release</id> restore point.</text>
</command-example>
@@ -383,7 +383,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<command-example-list>
<command-example title="Backup information">
<text><code-block>
- /path/to/pg_backrest.pl --stanza=db --output=json info
+ /path/to/<exe/> --stanza=db --output=json info
</code-block>
Get information about backups in the <id>db</id> stanza.</text>
@@ -402,7 +402,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<code-block>
wal_level = archive
archive_mode = on
- archive_command = '/path/to/backrest/bin/pg_backrest.pl --stanza=db archive-push %p'
+ archive_command = '/path/to/backrest/bin/<exe/> --stanza=db archive-push %p'
</code-block>
Replace the path with the actual location where <backrest/> was installed. The stanza parameter should be changed to the actual stanza name for your database.
</text>
@@ -456,7 +456,7 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
</config-example>
<config-example title="Simple Multiple Host Configuration">
- <text>This configuration is appropriate for a small installation where backups are being made remotely. Make sure that postgres@db-host has trusted ssh to backrest@backup-host and vice versa. This configuration assumes that you have pg_backrest_remote.pl and pg_backrest.pl in the same path on both servers.
+ <text>This configuration is appropriate for a small installation where backups are being made remotely. Make sure that postgres@db-host has trusted ssh to backrest@backup-host and vice versa. This configuration assumes that you have <exe/> in the same path on both servers.
<file>/etc/pg_backrest.conf</file> on the db host:
<code-block>
[parent: 38f48be3cf7b]