This file is indexed.

/usr/share/doc/pgbackrest-doc/html/configuration.html is in pgbackrest-doc 1.12-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>pgBackRest Configuration Reference</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta><meta property="og:site_name" content="pgBackRestReliable PostgreSQL Backup &amp; Restore"></meta><meta property="og:title" content="pgBackRest Configuration Reference"></meta><meta property="og:type" content="website"></meta><link rel="icon" href="favicon.png" type="image/png"></link><meta property="og:image:type" content="image/png"></meta><meta property="og:image" content="http://www.pgbackrest.org/logo.png"></meta><meta name="description" content="The pgBackRest Configuration Reference details all configuration options."></meta><meta property="og:description" content="The pgBackRest Configuration Reference details all configuration options."></meta><link rel="stylesheet" href="default.css" type="text/css"></link></head><body><div class="page-header"><div class="page-header-title">pgBackRest Configuration Reference</div></div><div class="page-menu"><div class="menu-body"><div class="menu"><a class="menu-link" href="index.html">Home</a></div><div class="menu"><a class="menu-link" href="user-guide.html">User Guide</a></div><div class="menu"><a class="menu-link" href="release.html">Releases</a></div><div class="menu"><a class="menu-link" href="command.html">Commands</a></div></div></div><div class="page-toc"><div class="page-toc-header"><div class="page-toc-title">Table of Contents</div></div><div class="page-toc-body"><div class="section1-toc"><div class="section1-toc-number">1</div><div class="section1-toc-title"><a href="#introduction">Introduction</a></div></div><div class="section1-toc"><div class="section1-toc-number">2</div><div class="section1-toc-title"><a href="#section-archive">Archive Options (<span class="id">archive</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">2.1</div><div class="section2-toc-title"><a href="#section-archive/option-archive-async">Asynchronous Archiving Option (<span class="id">--archive-async</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">2.2</div><div class="section2-toc-title"><a href="#section-archive/option-archive-max-mb">Maximum Archive MB Option (<span class="id">--archive-max-mb</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">3</div><div class="section1-toc-title"><a href="#section-backup">Backup Options (<span class="id">backup</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">3.1</div><div class="section2-toc-title"><a href="#section-backup/option-archive-check">Check Archive Option (<span class="id">--archive-check</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.2</div><div class="section2-toc-title"><a href="#section-backup/option-archive-copy">Copy Archive Option (<span class="id">--archive-copy</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.3</div><div class="section2-toc-title"><a href="#section-backup/option-backup-cmd">Backup Host Command Option (<span class="id">--backup-cmd</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.4</div><div class="section2-toc-title"><a href="#section-backup/option-backup-config">Backup Host Configuration Option (<span class="id">--backup-config</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.5</div><div class="section2-toc-title"><a href="#section-backup/option-backup-host">Backup Host Option (<span class="id">--backup-host</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.6</div><div class="section2-toc-title"><a href="#section-backup/option-backup-standby">Backup from Standby Option (<span class="id">--backup-standby</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.7</div><div class="section2-toc-title"><a href="#section-backup/option-backup-user">Backup User Option (<span class="id">--backup-user</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.8</div><div class="section2-toc-title"><a href="#section-backup/option-hardlink">Hardlink Option (<span class="id">--hardlink</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.9</div><div class="section2-toc-title"><a href="#section-backup/option-manifest-save-threshold">Manifest Save Threshold Option (<span class="id">--manifest-save-threshold</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.10</div><div class="section2-toc-title"><a href="#section-backup/option-resume">Resume Option (<span class="id">--resume</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.11</div><div class="section2-toc-title"><a href="#section-backup/option-start-fast">Start Fast Option (<span class="id">--start-fast</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">3.12</div><div class="section2-toc-title"><a href="#section-backup/option-stop-auto">Stop Auto Option (<span class="id">--stop-auto</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">4</div><div class="section1-toc-title"><a href="#section-expire">Expire Options (<span class="id">expire</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">4.1</div><div class="section2-toc-title"><a href="#section-expire/option-retention-archive">Archive Retention Option (<span class="id">--retention-archive</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">4.2</div><div class="section2-toc-title"><a href="#section-expire/option-retention-archive-type">Archive Retention Type Option (<span class="id">--retention-archive-type</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">4.3</div><div class="section2-toc-title"><a href="#section-expire/option-retention-diff">Differential Retention Option (<span class="id">--retention-diff</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">4.4</div><div class="section2-toc-title"><a href="#section-expire/option-retention-full">Full Retention Option (<span class="id">--retention-full</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">5</div><div class="section1-toc-title"><a href="#section-general">General Options (<span class="id">general</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">5.1</div><div class="section2-toc-title"><a href="#section-general/option-archive-timeout">Archive Timeout Option (<span class="id">--archive-timeout</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.2</div><div class="section2-toc-title"><a href="#section-general/option-buffer-size">Buffer Size Option (<span class="id">--buffer-size</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.3</div><div class="section2-toc-title"><a href="#section-general/option-checksum-page">Page Checksums Option (<span class="id">--checksum-page</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.4</div><div class="section2-toc-title"><a href="#section-general/option-cmd-ssh">SSH client command Option (<span class="id">--cmd-ssh</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.5</div><div class="section2-toc-title"><a href="#section-general/option-compress">Compress Option (<span class="id">--compress</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.6</div><div class="section2-toc-title"><a href="#section-general/option-compress-level">Compress Level Option (<span class="id">--compress-level</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.7</div><div class="section2-toc-title"><a href="#section-general/option-compress-level-network">Network Compress Level Option (<span class="id">--compress-level-network</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.8</div><div class="section2-toc-title"><a href="#section-general/option-db-timeout">Database Timeout Option (<span class="id">--db-timeout</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.9</div><div class="section2-toc-title"><a href="#section-general/option-lock-path">Lock Path Option (<span class="id">--lock-path</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.10</div><div class="section2-toc-title"><a href="#section-general/option-log-path">Log Path Option (<span class="id">--log-path</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.11</div><div class="section2-toc-title"><a href="#section-general/option-neutral-umask">Neutral Umask Option (<span class="id">--neutral-umask</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.12</div><div class="section2-toc-title"><a href="#section-general/option-process-max">Process Maximum Option (<span class="id">--process-max</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.13</div><div class="section2-toc-title"><a href="#section-general/option-protocol-timeout">Protocol Timeout Option (<span class="id">--protocol-timeout</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.14</div><div class="section2-toc-title"><a href="#section-general/option-repo-link">Repository Symlink Creation Option (<span class="id">--repo-link</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.15</div><div class="section2-toc-title"><a href="#section-general/option-repo-path">Repository Path Option (<span class="id">--repo-path</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.16</div><div class="section2-toc-title"><a href="#section-general/option-repo-sync">Repository Sync Option (<span class="id">--repo-sync</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">5.17</div><div class="section2-toc-title"><a href="#section-general/option-spool-path">Spool Path Option (<span class="id">--spool-path</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">6</div><div class="section1-toc-title"><a href="#section-log">Log Options (<span class="id">log</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">6.1</div><div class="section2-toc-title"><a href="#section-log/option-log-level-console">Console Log Level Option (<span class="id">--log-level-console</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">6.2</div><div class="section2-toc-title"><a href="#section-log/option-log-level-file">File Log Level Option (<span class="id">--log-level-file</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">6.3</div><div class="section2-toc-title"><a href="#section-log/option-log-level-stderr">Std Error Log Level Option (<span class="id">--log-level-stderr</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">7</div><div class="section1-toc-title"><a href="#section-restore">Restore Options (<span class="id">restore</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">7.1</div><div class="section2-toc-title"><a href="#section-restore/option-db-include">Include Database Option (<span class="id">--db-include</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">7.2</div><div class="section2-toc-title"><a href="#section-restore/option-link-all">Link All Option (<span class="id">--link-all</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">7.3</div><div class="section2-toc-title"><a href="#section-restore/option-link-map">Link Map Option (<span class="id">--link-map</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">7.4</div><div class="section2-toc-title"><a href="#section-restore/option-recovery-option">Recovery Option Option (<span class="id">--recovery-option</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">7.5</div><div class="section2-toc-title"><a href="#section-restore/option-tablespace-map">Tablespace Map Option (<span class="id">--tablespace-map</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">7.6</div><div class="section2-toc-title"><a href="#section-restore/option-tablespace-map-all">Map All Tablespaces Option (<span class="id">--tablespace-map-all</span>)</a></div></div></div><div class="section1-toc"><div class="section1-toc-number">8</div><div class="section1-toc-title"><a href="#section-stanza">Stanza Options (<span class="id">stanza</span>)</a></div><div class="section2-toc"><div class="section2-toc-number">8.1</div><div class="section2-toc-title"><a href="#section-stanza/option-db-cmd">Database Host Command Option (<span class="id">--db-cmd</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.2</div><div class="section2-toc-title"><a href="#section-stanza/option-db-config">Database Host Configuration Option (<span class="id">--db-config</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.3</div><div class="section2-toc-title"><a href="#section-stanza/option-db-host">Database Host Option (<span class="id">--db-host</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.4</div><div class="section2-toc-title"><a href="#section-stanza/option-db-path">Database Path Option (<span class="id">--db-path</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.5</div><div class="section2-toc-title"><a href="#section-stanza/option-db-port">Database Port Option (<span class="id">--db-port</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.6</div><div class="section2-toc-title"><a href="#section-stanza/option-db-socket-path">Database Socket Path Option (<span class="id">--db-socket-path</span>)</a></div></div><div class="section2-toc"><div class="section2-toc-number">8.7</div><div class="section2-toc-title"><a href="#section-stanza/option-db-user">Database User Option (<span class="id">--db-user</span>)</a></div></div></div></div></div><div class="page-body"><div class="section1"><a id="introduction"></a><div class="section1-header"><div class="section1-number">1</div><div class="section1-title">Introduction</div></div><div class="section-intro"><span class="backrest">pgBackRest</span> can be used entirely with command-line parameters but a configuration file is more practical for installations that are complex or set a lot of options. The default location for the configuration file is <span class="file">/etc/pgbackrest.conf</span>.</div><div class="section-body"></div></div><div class="section1"><a id="section-archive"></a><div class="section1-header"><div class="section1-number">2</div><div class="section1-title">Archive Options (<span class="id">archive</span>)</div></div><div class="section-body"><div class="section2"><a id="section-archive/option-archive-async"></a><div class="section2-header"><div class="section2-number">2.1</div><div class="section2-title">Asynchronous Archiving Option (<span class="id">--archive-async</span>)</div></div><div class="section-body"><div class="section-body-text">Archive WAL segments asynchronously.</div><div class="section-body-text">WAL segments will be copied to the local repo, then a process will be forked to compress the segment and transfer it to the remote repo if configured. Control will be returned to <span class="postgres">PostgreSQL</span> as soon as the WAL segment is copied locally.</div><pre class="code-block">default: n
example: archive-async=y</pre></div></div><div class="section2"><a id="section-archive/option-archive-max-mb"></a><div class="section2-header"><div class="section2-number">2.2</div><div class="section2-title">Maximum Archive MB Option (<span class="id">--archive-max-mb</span>)</div></div><div class="section-body"><div class="section-body-text">Limit size of the local asynchronous archive queue when <span class="br-setting">archive-async=y</span>.</div><div class="section-body-text">After the limit is reached, the following will happen:<br/>
<ol><li><span class="backrest">pgBackRest</span> will notify Postgres that the archive was successfully backed up, then DROP IT.</li><li>An error will be logged to the console and also to the Postgres log.</li><li>A stop file will be written in the lock directory and no more archive files will be backed up until it is removed.</li></ol>If this occurs then the archive log stream will be interrupted and PITR will not be possible past that point. A new backup will be required to regain full restore capability.<br/>
<br/>
The purpose of this feature is to prevent the log volume from filling up at which point Postgres will stop completely. Better to lose the backup than have <span class="postgres">PostgreSQL</span> go down.<br/>
<br/>
To start normal archiving again you'll need to remove the stop file which will be located at <span class="file">${repo-path}/lock/${stanza}-archive.stop</span> where <span class="id">${repo-path}</span> is the path set in the <span class="br-setting">general</span> section, and <span class="id">${stanza}</span> is the backup stanza.</div><pre class="code-block">example: archive-max-mb=1024</pre></div></div></div></div><div class="section1"><a id="section-backup"></a><div class="section1-header"><div class="section1-number">3</div><div class="section1-title">Backup Options (<span class="id">backup</span>)</div></div><div class="section-body"><div class="section2"><a id="section-backup/option-archive-check"></a><div class="section2-header"><div class="section2-number">3.1</div><div class="section2-title">Check Archive Option (<span class="id">--archive-check</span>)</div></div><div class="section-body"><div class="section-body-text">Check that WAL segments are present in the archive before backup completes.</div><div class="section-body-text">Checks that all WAL segments required to make the backup consistent are present in the WAL archive. It's a good idea to leave this as the default unless you are using another method for archiving.</div><pre class="code-block">default: y
example: archive-check=n</pre></div></div><div class="section2"><a id="section-backup/option-archive-copy"></a><div class="section2-header"><div class="section2-number">3.2</div><div class="section2-title">Copy Archive Option (<span class="id">--archive-copy</span>)</div></div><div class="section-body"><div class="section-body-text">Copy WAL segments needed for consistency to the backup.</div><div class="section-body-text">This slightly paranoid option protects against corruption or premature expiration in the WAL segment archive by storing the WAL segments directly in the backup. PITR won't be possible without the WAL segment archive and this option also consumes more space.<br/>
<br/>
Even though WAL segments will be restored with the backup, <span class="postgres">PostgreSQL</span> will ignore them if a <span class="file">recovery.conf</span> file exists and instead use <span class="br-setting">archive_command</span> to fetch WAL segments. Specifying <span class="br-setting">type=none</span> when restoring will not create <span class="file">recovery.conf</span> and force <span class="postgres">PostgreSQL</span> to use the WAL segments in pg_xlog. This will get the database cluster to a consistent state.</div><pre class="code-block">default: n
example: archive-copy=y</pre></div></div><div class="section2"><a id="section-backup/option-backup-cmd"></a><div class="section2-header"><div class="section2-number">3.3</div><div class="section2-title">Backup Host Command Option (<span class="id">--backup-cmd</span>)</div></div><div class="section-body"><div class="section-body-text"><span class="backrest">pgBackRest</span> exe path on the backup host.</div><div class="section-body-text">Required only if the path to <span class="file">pgbackrest</span> is different on the local and backup hosts. If not defined, the backup host exe path will be set the same as the local exe path.</div><pre class="code-block">default: [INSTALL-PATH]/pgbackrest
example: backup-cmd=/usr/lib/backrest/bin/pgbackrest</pre></div></div><div class="section2"><a id="section-backup/option-backup-config"></a><div class="section2-header"><div class="section2-number">3.4</div><div class="section2-title">Backup Host Configuration Option (<span class="id">--backup-config</span>)</div></div><div class="section-body"><div class="section-body-text"><span class="backrest">pgBackRest</span> backup host configuration file.</div><div class="section-body-text">Sets the location of the configuration file on the backup host. This is only required if the backup host configuration file is in a different location than the local configuration file.</div><pre class="code-block">default: /etc/pgbackrest.conf
example: backup-config=/etc/pgbackrest_backup.conf</pre></div></div><div class="section2"><a id="section-backup/option-backup-host"></a><div class="section2-header"><div class="section2-number">3.5</div><div class="section2-title">Backup Host Option (<span class="id">--backup-host</span>)</div></div><div class="section-body"><div class="section-body-text">Backup host when operating remotely via SSH.</div><div class="section-body-text">Make sure that trusted SSH authentication is configured between the db host and the backup host.<br/>
<br/>
When backing up to a locally mounted network filesystem this setting is not required.</div><pre class="code-block">example: backup-host=backup.domain.com</pre></div></div><div class="section2"><a id="section-backup/option-backup-standby"></a><div class="section2-header"><div class="section2-number">3.6</div><div class="section2-title">Backup from Standby Option (<span class="id">--backup-standby</span>)</div></div><div class="section-body"><div class="section-body-text">Backup from the standby cluster.</div><div class="section-body-text">Enable backup from standby to reduce load on the master cluster. This option requires that both the <span class="host">master</span> and <span class="host">standby</span> hosts be configured.</div><pre class="code-block">default: n
example: backup-standby=y</pre></div></div><div class="section2"><a id="section-backup/option-backup-user"></a><div class="section2-header"><div class="section2-number">3.7</div><div class="section2-title">Backup User Option (<span class="id">--backup-user</span>)</div></div><div class="section-body"><div class="section-body-text">Backup host user when <span class="br-setting">backup-host</span> is set.</div><div class="section-body-text">Defines the user that will be used for operations on the backup server. Preferably this is not the <span class="id">postgres</span> user but rather some other user like <span class="id">backrest</span>. If <span class="postgres">PostgreSQL</span> runs on the backup server the <span class="id">postgres</span> user can be placed in the <span class="id">backrest</span> group so it has read permissions on the repository without being able to damage the contents accidentally.</div><pre class="code-block">default: backrest
example: backup-user=backrest</pre></div></div><div class="section2"><a id="section-backup/option-hardlink"></a><div class="section2-header"><div class="section2-number">3.8</div><div class="section2-title">Hardlink Option (<span class="id">--hardlink</span>)</div></div><div class="section-body"><div class="section-body-text">Hardlink files between backups.</div><div class="section-body-text">Enable hard-linking of files in differential and incremental backups to their full backups. This gives the appearance that each backup is a full backup. Be careful, though, because modifying files that are hard-linked can affect all the backups in the set.</div><pre class="code-block">default: n
example: hardlink=y</pre></div></div><div class="section2"><a id="section-backup/option-manifest-save-threshold"></a><div class="section2-header"><div class="section2-number">3.9</div><div class="section2-title">Manifest Save Threshold Option (<span class="id">--manifest-save-threshold</span>)</div></div><div class="section-body"><div class="section-body-text">Manifest save threshold during backup.</div><div class="section-body-text">Defines how often the manifest will be saved during a backup (in bytes). Saving the manifest is important because it stores the checksums and allows the resume function to work efficiently. The actual threshold used is 1% of the backup size or <span class="br-setting">manifest-save-threshold</span>, whichever is greater.</div><pre class="code-block">default: 1073741824
example: manifest-save-threshold=5368709120</pre></div></div><div class="section2"><a id="section-backup/option-resume"></a><div class="section2-header"><div class="section2-number">3.10</div><div class="section2-title">Resume Option (<span class="id">--resume</span>)</div></div><div class="section-body"><div class="section-body-text">Allow resume of failed backup.</div><div class="section-body-text">Defines whether the resume feature is enabled. Resume can greatly reduce the amount of time required to run a backup after a previous backup of the same type has failed. It adds complexity, however, so it may be desirable to disable in environments that do not require the feature.</div><pre class="code-block">default: y
example: resume=n</pre></div></div><div class="section2"><a id="section-backup/option-start-fast"></a><div class="section2-header"><div class="section2-number">3.11</div><div class="section2-title">Start Fast Option (<span class="id">--start-fast</span>)</div></div><div class="section-body"><div class="section-body-text">Force a checkpoint to start backup quickly.</div><div class="section-body-text">Forces a checkpoint (by passing <span class="id">y</span> to the <span class="id">fast</span> parameter of <span class="id">pg_start_backup()</span>) so the backup begins immediately. Otherwise the backup will start after the next regular checkpoint.<br/>
<br/>
This feature only works in <span class="postgres">PostgreSQL</span> >= <span class="id">8.4</span>.</div><pre class="code-block">default: n
example: start-fast=y</pre></div></div><div class="section2"><a id="section-backup/option-stop-auto"></a><div class="section2-header"><div class="section2-number">3.12</div><div class="section2-title">Stop Auto Option (<span class="id">--stop-auto</span>)</div></div><div class="section-body"><div class="section-body-text">Stop prior failed backup on new backup.</div><div class="section-body-text">This will only be done if an exclusive advisory lock can be acquired to demonstrate that the prior failed backup process has really stopped.<br/>
<br/>
This feature relies on pg_is_in_backup() so only works on <span class="postgres">PostgreSQL</span> >= <span class="id">9.3</span>.<br/>
<br/>
The setting is disabled by default because it assumes that <span class="backrest">pgBackRest</span> is the only process doing exclusive online backups. It depends on an advisory lock that only <span class="backrest">pgBackRest</span> sets so it may abort other processes that do exclusive online backups. Note that <span class="cmd">base_backup</span> and <span class="cmd">pg_dump</span> are safe to use with this setting because they do not call <span class="id">pg_start_backup()</span> so are not exclusive.</div><pre class="code-block">default: n
example: stop-auto=y</pre></div></div></div></div><div class="section1"><a id="section-expire"></a><div class="section1-header"><div class="section1-number">4</div><div class="section1-title">Expire Options (<span class="id">expire</span>)</div></div><div class="section-body"><div class="section2"><a id="section-expire/option-retention-archive"></a><div class="section2-header"><div class="section2-number">4.1</div><div class="section2-title">Archive Retention Option (<span class="id">--retention-archive</span>)</div></div><div class="section-body"><div class="section-body-text">Number of backups worth of continuous WAL to retain.</div><div class="section-body-text">Note that the WAL segments required to make a backup consistent are always retained until the backup is expired regardless of how this option is configured.<br/>
<br/>
If this value is not set, then the archive to expire will default to the <span class="br-setting">retention-full</span> (or <span class="br-setting">retention-diff</span>) value corresponding to the <span class="br-setting">retention-archive-type</span> if set to <span class="br-setting">full</span> (or <span class="br-setting">diff</span>). This will ensure that WAL is only expired for backups that are already expired.<br/>
<br/>
This option must be set if <span class="br-setting">retention-archive-type</span> is set to <span class="br-setting">incr</span>. If disk space is at a premium, then this setting, in conjunction with <span class="br-setting">retention-archive-type</span>, can be used to aggressively expire WAL segments. However, doing so negates the ability to perform PITR from the backups with expired WAL and is therefore <b>not</b> recommended.</div><pre class="code-block">allowed: 1-999999999
example: retention-archive=2</pre></div></div><div class="section2"><a id="section-expire/option-retention-archive-type"></a><div class="section2-header"><div class="section2-number">4.2</div><div class="section2-title">Archive Retention Type Option (<span class="id">--retention-archive-type</span>)</div></div><div class="section-body"><div class="section-body-text">Backup type for WAL retention.</div><div class="section-body-text">If set to <span class="br-setting">full</span> <span class="backrest">pgBackRest</span> will keep archive logs for the number of full backups defined by <span class="br-setting">retention-archive</span>. If set to <span class="br-setting">diff</span> (differential) <span class="backrest">pgBackRest</span> will keep archive logs for the number of full and differential backups defined by <span class="br-setting">retention-archive</span>, meaning if the last backup taken was a full backup, it will be counted as a differential for the purpose of retention. If set to <span class="br-setting">incr</span> (incremental) <span class="backrest">pgBackRest</span> will keep archive logs for the number of full, differential, and incremental backups defined by <span class="br-setting">retention-archive</span>. It is recommended that this setting not be changed from the default which will only expire WAL in conjunction with expiring full backups.</div><pre class="code-block">default: full
example: retention-archive-type=diff</pre></div></div><div class="section2"><a id="section-expire/option-retention-diff"></a><div class="section2-header"><div class="section2-number">4.3</div><div class="section2-title">Differential Retention Option (<span class="id">--retention-diff</span>)</div></div><div class="section-body"><div class="section-body-text">Number of differential backups to retain.</div><div class="section-body-text">When a differential backup expires, all incremental backups associated with the differential backup will also expire. When not defined all differential backups will be kept until the full backups they depend on expire.</div><pre class="code-block">allowed: 1-999999999
example: retention-diff=3</pre></div></div><div class="section2"><a id="section-expire/option-retention-full"></a><div class="section2-header"><div class="section2-number">4.4</div><div class="section2-title">Full Retention Option (<span class="id">--retention-full</span>)</div></div><div class="section-body"><div class="section-body-text">Number of full backups to retain.</div><div class="section-body-text">When a full backup expires, all differential and incremental backups associated with the full backup will also expire. When the option is not defined a warning will be issued. If indefinite retention is desired then set the option to the max value.</div><pre class="code-block">allowed: 1-999999999
example: retention-full=2</pre></div></div></div></div><div class="section1"><a id="section-general"></a><div class="section1-header"><div class="section1-number">5</div><div class="section1-title">General Options (<span class="id">general</span>)</div></div><div class="section-body"><div class="section2"><a id="section-general/option-archive-timeout"></a><div class="section2-header"><div class="section2-number">5.1</div><div class="section2-title">Archive Timeout Option (<span class="id">--archive-timeout</span>)</div></div><div class="section-body"><div class="section-body-text">Archive timeout.</div><div class="section-body-text">Set maximum time, in seconds, to wait for WAL segments to reach the archive. The timeout applies to the <span class="cmd">check</span> command and to the <span class="cmd">backup</span> command when waiting for WAL segments required to make the backup consistent to be archived.</div><pre class="code-block">default: 60
allowed: 0.1-86400
example: archive-timeout=30</pre></div></div><div class="section2"><a id="section-general/option-buffer-size"></a><div class="section2-header"><div class="section2-number">5.2</div><div class="section2-title">Buffer Size Option (<span class="id">--buffer-size</span>)</div></div><div class="section-body"><div class="section-body-text">Buffer size for file operations.</div><div class="section-body-text">Set the buffer size used for copy, compress, and uncompress functions. A maximum of 3 buffers will be in use at a time per process. An additional maximum of 256K per process may be used for zlib buffers.</div><pre class="code-block">default: 4194304
allowed: 16384-8388608
example: buffer-size=32768</pre></div></div><div class="section2"><a id="section-general/option-checksum-page"></a><div class="section2-header"><div class="section2-number">5.3</div><div class="section2-title">Page Checksums Option (<span class="id">--checksum-page</span>)</div></div><div class="section-body"><div class="section-body-text">Validate data page checksums.</div><div class="section-body-text">Directs <span class="backrest">pgBackRest</span> to validate all data page checksums while backing up a cluster. This option will be automatically enabled when the required C library is present and checksums are enabled on the cluster.<br/>
<br/>
Failures in checksum validation will not abort a backup. Rather, warnings will be emitted in the log (and to the console with default settings) and the list of invalid pages will be stored in the backup manifest.</div><pre class="code-block">example: checksum-page=n</pre></div></div><div class="section2"><a id="section-general/option-cmd-ssh"></a><div class="section2-header"><div class="section2-number">5.4</div><div class="section2-title">SSH client command Option (<span class="id">--cmd-ssh</span>)</div></div><div class="section-body"><div class="section-body-text">Path to ssh client executable.</div><div class="section-body-text">Use a specific SSH client when an alternate is desired or the <span class="file">ssh</span> executable is not in $PATH.</div><pre class="code-block">default: ssh
example: cmd-ssh=/usr/bin/ssh</pre></div></div><div class="section2"><a id="section-general/option-compress"></a><div class="section2-header"><div class="section2-number">5.5</div><div class="section2-title">Compress Option (<span class="id">--compress</span>)</div></div><div class="section-body"><div class="section-body-text">Use gzip file compression.</div><div class="section-body-text">Backup files are compatible with command-line gzip tools.</div><pre class="code-block">default: y
example: compress=n</pre></div></div><div class="section2"><a id="section-general/option-compress-level"></a><div class="section2-header"><div class="section2-number">5.6</div><div class="section2-title">Compress Level Option (<span class="id">--compress-level</span>)</div></div><div class="section-body"><div class="section-body-text">Compression level for stored files.</div><div class="section-body-text">Sets the zlib level to be used for file compression when <span class="br-setting">compress=y</span>.</div><pre class="code-block">default: 6
allowed: 0-9
example: compress-level=9</pre></div></div><div class="section2"><a id="section-general/option-compress-level-network"></a><div class="section2-header"><div class="section2-number">5.7</div><div class="section2-title">Network Compress Level Option (<span class="id">--compress-level-network</span>)</div></div><div class="section-body"><div class="section-body-text">Compression level for network transfer when <span class="br-setting">compress=n</span>.</div><div class="section-body-text">Sets the zlib level to be used for protocol compression when <span class="br-setting">compress=n</span> and the database cluster is not on the same host as the backup. Protocol compression is used to reduce network traffic but can be disabled by setting <span class="br-setting">compress-level-network=0</span>. When <span class="br-setting">compress=y</span> the <span class="br-setting">compress-level-network</span> setting is ignored and <span class="br-setting">compress-level</span> is used instead so that the file is only compressed once. SSH compression is always disabled.</div><pre class="code-block">default: 3
allowed: 0-9
example: compress-level-network=1</pre></div></div><div class="section2"><a id="section-general/option-db-timeout"></a><div class="section2-header"><div class="section2-number">5.8</div><div class="section2-title">Database Timeout Option (<span class="id">--db-timeout</span>)</div></div><div class="section-body"><div class="section-body-text">Database query timeout.</div><div class="section-body-text">Sets the timeout, in seconds, for queries against the database. This includes the <span class="id">pg_start_backup()</span> and <span class="id">pg_stop_backup()</span> functions which can each take a substantial amount of time. Because of this the timeout should be kept high unless you know that these functions will return quickly (i.e. if you have set <span class="br-setting">startfast=y</span> and you know that the database cluster will not generate many WAL segments during the backup).</div><pre class="code-block">default: 1800
allowed: 0.1-604800
example: db-timeout=600</pre></div></div><div class="section2"><a id="section-general/option-lock-path"></a><div class="section2-header"><div class="section2-number">5.9</div><div class="section2-title">Lock Path Option (<span class="id">--lock-path</span>)</div></div><div class="section-body"><div class="section-body-text">Path where lock files are stored.</div><div class="section-body-text">The lock path provides a location for <span class="backrest">pgBackRest</span> to create lock files to prevent conflicting operations from being run concurrently.</div><pre class="code-block">default: /tmp/pgbackrest
example: lock-path=/backup/db/lock</pre></div></div><div class="section2"><a id="section-general/option-log-path"></a><div class="section2-header"><div class="section2-number">5.10</div><div class="section2-title">Log Path Option (<span class="id">--log-path</span>)</div></div><div class="section-body"><div class="section-body-text">Path where log files are stored.</div><div class="section-body-text">The log path provides a location for <span class="backrest">pgBackRest</span> to store log files. Note that if <span class="br-setting">log-level-file=none</span> then no log path is required.</div><pre class="code-block">default: /var/log/pgbackrest
example: log-path=/backup/db/log</pre></div></div><div class="section2"><a id="section-general/option-neutral-umask"></a><div class="section2-header"><div class="section2-number">5.11</div><div class="section2-title">Neutral Umask Option (<span class="id">--neutral-umask</span>)</div></div><div class="section-body"><div class="section-body-text">Use a neutral umask.</div><div class="section-body-text">Sets the umask to 0000 so modes in the repository are created in a sensible way. The default directory mode is 0750 and default file mode is 0640. The lock and log directories set the directory and file mode to 0770 and 0660 respectively.<br/>
<br/>
To use the executing user's umask instead specify <span class="br-setting">neutral-umask=n</span> in the config file or <span class="br-setting">--no-neutral-umask</span> on the command line.</div><pre class="code-block">default: y
example: neutral-umask=n</pre></div></div><div class="section2"><a id="section-general/option-process-max"></a><div class="section2-header"><div class="section2-number">5.12</div><div class="section2-title">Process Maximum Option (<span class="id">--process-max</span>)</div></div><div class="section-body"><div class="section-body-text">Max processes to use for compress/transfer.</div><div class="section-body-text">Each process will perform compression and transfer to make the command run faster, but don't set <span class="br-setting">process-max</span> so high that it impacts database performance.</div><pre class="code-block">default: 1
allowed: 1-96
example: process-max=4</pre></div></div><div class="section2"><a id="section-general/option-protocol-timeout"></a><div class="section2-header"><div class="section2-number">5.13</div><div class="section2-title">Protocol Timeout Option (<span class="id">--protocol-timeout</span>)</div></div><div class="section-body"><div class="section-body-text">Protocol timeout.</div><div class="section-body-text">Sets the timeout, in seconds, that the master or remote process will wait for a new message to be received on the protocol layer. This prevents processes from waiting indefinitely for a message. The <span class="br-option">protocol-timeout</span> option must be greater than the <span class="br-option">db-timeout</span> option.</div><pre class="code-block">default: 1830
allowed: 0.1-604800
example: protocol-timeout=630</pre></div></div><div class="section2"><a id="section-general/option-repo-link"></a><div class="section2-header"><div class="section2-number">5.14</div><div class="section2-title">Repository Symlink Creation Option (<span class="id">--repo-link</span>)</div></div><div class="section-body"><div class="section-body-text">Create convenience symlinks in repository.</div><div class="section-body-text">Creates the convenience link <span class="path">latest</span> in the stanza directory and internal tablespace symlinks in each backup directory. The internal tablespace symlinks allow clusters to be brought up manually in-place using filesystem snapshots as long as the backup is not compressed.<br/>
<br/>
This option should be disabled when the repository is located on a filesystem that does not support symlinks. No <span class="backrest">pgBackRest</span> functionality will be affected, but certain manual operations on the repository may be less convenient.</div><pre class="code-block">default: y
example: repo-link=n</pre></div></div><div class="section2"><a id="section-general/option-repo-path"></a><div class="section2-header"><div class="section2-number">5.15</div><div class="section2-title">Repository Path Option (<span class="id">--repo-path</span>)</div></div><div class="section-body"><div class="section-body-text">Repository path where WAL segments and backups stored.</div><div class="section-body-text">The repository is where <span class="backrest">pgBackRest</span> stores backup and archives WAL segments.<br/>
<br/>
If you are new to backup then it will be difficult to estimate in advance how much space you'll need. The best thing to do is take some backups then record the size of different types of backups (full/incr/diff) and measure the amount of WAL generated per day. This will give you a general idea of how much space you'll need, though of course requirements will likely change over time as your database evolves.</div><pre class="code-block">default: /var/lib/pgbackrest
example: repo-path=/backup/db/backrest</pre></div></div><div class="section2"><a id="section-general/option-repo-sync"></a><div class="section2-header"><div class="section2-number">5.16</div><div class="section2-title">Repository Sync Option (<span class="id">--repo-sync</span>)</div></div><div class="section-body"><div class="section-body-text">Sync directories in repository.</div><div class="section-body-text">Syncs directories when writing to the repository. Not all file systems support directory syncs (e.g., NTFS) so this option allows them to be disabled.</div><pre class="code-block">default: y
example: repo-sync=n</pre></div></div><div class="section2"><a id="section-general/option-spool-path"></a><div class="section2-header"><div class="section2-number">5.17</div><div class="section2-title">Spool Path Option (<span class="id">--spool-path</span>)</div></div><div class="section-body"><div class="section-body-text">Path where WAL segments are spooled during async archiving.</div><div class="section-body-text">When asynchronous archiving is enabled <span class="backrest">pgBackRest</span> needs a local directory to store WAL segments before they are compressed and moved to the repository. Depending on the volume of WAL generated this directory could become very large so be sure to plan accordingly.<br/>
<br/>
The <span class="br-setting">max-archive-mb</span> option can be used to limit the amount of WAL that will be spooled locally.</div><pre class="code-block">default: /var/spool/pgbackrest
example: spool-path=/backup/db/spool</pre></div></div></div></div><div class="section1"><a id="section-log"></a><div class="section1-header"><div class="section1-number">6</div><div class="section1-title">Log Options (<span class="id">log</span>)</div></div><div class="section-body"><div class="section2"><a id="section-log/option-log-level-console"></a><div class="section2-header"><div class="section2-number">6.1</div><div class="section2-title">Console Log Level Option (<span class="id">--log-level-console</span>)</div></div><div class="section-body"><div class="section-body-text">Level for console logging.</div><div class="section-body-text">The following log levels are supported:<br/>
<ul><li><span class="id">off</span> - No logging at all (not recommended)</li><li><span class="id">error</span> - Log only errors</li><li><span class="id">warn</span> - Log warnings and errors</li><li><span class="id">info</span> - Log info, warnings, and errors</li><li><span class="id">detail</span> - Log detail, info, warnings, and errors</li><li><span class="id">debug</span> - Log debug, detail, info, warnings, and errors</li><li><span class="id">trace</span> - Log trace (very verbose debugging), debug, info, warnings, and errors</li></ul></div><pre class="code-block">default: warn
example: log-level-console=error</pre></div></div><div class="section2"><a id="section-log/option-log-level-file"></a><div class="section2-header"><div class="section2-number">6.2</div><div class="section2-title">File Log Level Option (<span class="id">--log-level-file</span>)</div></div><div class="section-body"><div class="section-body-text">Level for file logging.</div><div class="section-body-text">The following log levels are supported:<br/>
<ul><li><span class="id">off</span> - No logging at all (not recommended)</li><li><span class="id">error</span> - Log only errors</li><li><span class="id">warn</span> - Log warnings and errors</li><li><span class="id">info</span> - Log info, warnings, and errors</li><li><span class="id">detail</span> - Log detail, info, warnings, and errors</li><li><span class="id">debug</span> - Log debug, detail, info, warnings, and errors</li><li><span class="id">trace</span> - Log trace (very verbose debugging), debug, info, warnings, and errors</li></ul></div><pre class="code-block">default: info
example: log-level-file=debug</pre></div></div><div class="section2"><a id="section-log/option-log-level-stderr"></a><div class="section2-header"><div class="section2-number">6.3</div><div class="section2-title">Std Error Log Level Option (<span class="id">--log-level-stderr</span>)</div></div><div class="section-body"><div class="section-body-text">Level for stderr logging.</div><div class="section-body-text">Specifies which log levels must will be output to <span class="id">stderr</span> rather than <span class="id">stdout</span> (specified by <span class="br-option">log-level-console</span>). The timestamp and process will not be output to <span class="id">stderr</span>.<br/>
<br/>
The following log levels are supported:<br/>
<ul><li><span class="id">off</span> - No logging at all (not recommended)</li><li><span class="id">error</span> - Log only errors</li><li><span class="id">warn</span> - Log warnings and errors</li><li><span class="id">info</span> - Log info, warnings, and errors</li><li><span class="id">detail</span> - Log detail, info, warnings, and errors</li><li><span class="id">debug</span> - Log debug, detail, info, warnings, and errors</li><li><span class="id">trace</span> - Log trace (very verbose debugging), debug, info, warnings, and errors</li></ul></div><pre class="code-block">default: warn
example: log-level-stderr=error</pre></div></div></div></div><div class="section1"><a id="section-restore"></a><div class="section1-header"><div class="section1-number">7</div><div class="section1-title">Restore Options (<span class="id">restore</span>)</div></div><div class="section-body"><div class="section2"><a id="section-restore/option-db-include"></a><div class="section2-header"><div class="section2-number">7.1</div><div class="section2-title">Include Database Option (<span class="id">--db-include</span>)</div></div><div class="section-body"><div class="section-body-text">Restore only specified databases.</div><div class="section-body-text">This feature allows only selected databases to be restored. Databases not specifically included will be restored as sparse, zeroed files to save space but still allow <span class="postgres">PostgreSQL</span> to perform recovery. After recovery the databases that were not included will not be accessible but can be removed with the <span class="id">drop database</span> command.<br/>
<br/>
Note that built-in databases (<span class="id">template0</span>, <span class="id">template1</span>, and <span class="id">postgres</span>) are always restored.<br/>
<br/>
The <span class="br-setting">--db-include</span> option can be passed multiple times to specify more than one database to include.</div><pre class="code-block">example: db-include=db_main</pre></div></div><div class="section2"><a id="section-restore/option-link-all"></a><div class="section2-header"><div class="section2-number">7.2</div><div class="section2-title">Link All Option (<span class="id">--link-all</span>)</div></div><div class="section-body"><div class="section-body-text">Restore all symlinks.</div><div class="section-body-text">By default symlinked directories and files are restored as normal directories and files in $PGDATA. This is because it may not be safe to restore symlinks to their original destinations on a system other than where the original backup was performed. This option restores all the symlinks just as they were on the original system where the backup was performed.</div><pre class="code-block">default: n
example: link-all=y</pre></div></div><div class="section2"><a id="section-restore/option-link-map"></a><div class="section2-header"><div class="section2-number">7.3</div><div class="section2-title">Link Map Option (<span class="id">--link-map</span>)</div></div><div class="section-body"><div class="section-body-text">Modify the destination of a symlink.</div><div class="section-body-text">Allows the destination file or path of a symlink to be changed on restore. This is useful for restoring to systems that have a different storage layout than the original system where the backup was generated.</div><pre class="code-block">example: link-map=pg_xlog=/data/xlog</pre></div></div><div class="section2"><a id="section-restore/option-recovery-option"></a><div class="section2-header"><div class="section2-number">7.4</div><div class="section2-title">Recovery Option Option (<span class="id">--recovery-option</span>)</div></div><div class="section-body"><div class="section-body-text">Set an option in <span class="file">recovery.conf</span>.</div><div class="section-body-text">See http://www.postgresql.org/docs/X.X/static/recovery-config.html for details on recovery.conf options (replace X.X with your <span class="postgres">PostgreSQL</span> version). This option can be used multiple times.<br/>
<br/>
Note: The <span class="br-setting">restore_command</span> option will be automatically generated but can be overridden with this option. Be careful about specifying your own <span class="br-setting">restore_command</span> as <span class="backrest">pgBackRest</span> is designed to handle this for you. Target Recovery options (recovery_target_name, recovery_target_time, etc.) are generated automatically by <span class="backrest">pgBackRest</span> and should not be set with this option.<br/>
<br/>
Since <span class="backrest">pgBackRest</span> does not start <span class="postgres">PostgreSQL</span> after writing the <span class="file">recovery.conf</span> file, it is always possible to edit/check <span class="file">recovery.conf</span> before manually restarting.</div><pre class="code-block">example: recovery-option=primary_conninfo=db.mydomain.com</pre></div></div><div class="section2"><a id="section-restore/option-tablespace-map"></a><div class="section2-header"><div class="section2-number">7.5</div><div class="section2-title">Tablespace Map Option (<span class="id">--tablespace-map</span>)</div></div><div class="section-body"><div class="section-body-text">Restore a tablespace into the specified directory.</div><div class="section-body-text">Moves a tablespace to a new location during the restore. This is useful when tablespace locations are not the same on a replica, or an upgraded system has different mount points.<br/>
<br/>
Since <span class="postgres">PostgreSQL</span> 9.2 tablespace locations are not stored in pg_tablespace so moving tablespaces can be done with impunity. However, moving a tablespace to the <span class="br-setting">data_directory</span> is not recommended and may cause problems. For more information on moving tablespaces http://www.databasesoup.com/2013/11/moving-tablespaces.html is a good resource.</div><pre class="code-block">example: tablespace-map=ts_01=/db/ts_01</pre></div></div><div class="section2"><a id="section-restore/option-tablespace-map-all"></a><div class="section2-header"><div class="section2-number">7.6</div><div class="section2-title">Map All Tablespaces Option (<span class="id">--tablespace-map-all</span>)</div></div><div class="section-body"><div class="section-body-text">Restore all tablespaces into the specified directory.</div><div class="section-body-text">By default tablespaces are restored into their original locations and while this behavior can be modified by with the <span class="br-setting">tablespace-map</span> open it is sometime preferable to remap all tablespaces to a new directory all at once. This is particularly useful for development or staging systems that may not have the same storage layout as the original system where the backup was generated.<br/>
<br/>
The path specified will be the parent path used to create all the tablespaces in the backup.</div><pre class="code-block">example: tablespace-map-all=/data/tablespace</pre></div></div></div></div><div class="section1"><a id="section-stanza"></a><div class="section1-header"><div class="section1-number">8</div><div class="section1-title">Stanza Options (<span class="id">stanza</span>)</div></div><div class="section-body"><div class="section2"><a id="section-stanza/option-db-cmd"></a><div class="section2-header"><div class="section2-number">8.1</div><div class="section2-title">Database Host Command Option (<span class="id">--db-cmd</span>)</div></div><div class="section-body"><div class="section-body-text"><span class="backrest">pgBackRest</span> exe path on the database host.</div><div class="section-body-text">Required only if the path to <span class="file">pgbackrest</span> is different on the local and database hosts. If not defined, the database host exe path will be set the same as the local exe path.</div><pre class="code-block">default: [INSTALL-PATH]/pgbackrest
example: db-cmd=/usr/lib/backrest/bin/pgbackrest</pre></div></div><div class="section2"><a id="section-stanza/option-db-config"></a><div class="section2-header"><div class="section2-number">8.2</div><div class="section2-title">Database Host Configuration Option (<span class="id">--db-config</span>)</div></div><div class="section-body"><div class="section-body-text"><span class="backrest">pgBackRest</span> database host configuration file.</div><div class="section-body-text">Sets the location of the configuration file on the database host. This is only required if the database host configuration file is in a different location than the local configuration file.</div><pre class="code-block">default: /etc/pgbackrest.conf
example: db-config=/etc/pgbackrest_db.conf</pre></div></div><div class="section2"><a id="section-stanza/option-db-host"></a><div class="section2-header"><div class="section2-number">8.3</div><div class="section2-title">Database Host Option (<span class="id">--db-host</span>)</div></div><div class="section-body"><div class="section-body-text">Cluster host for operating remotely via SSH.</div><div class="section-body-text">Used for backups where the database cluster host is different from the backup host.</div><pre class="code-block">example: db-host=db.domain.com</pre></div></div><div class="section2"><a id="section-stanza/option-db-path"></a><div class="section2-header"><div class="section2-number">8.4</div><div class="section2-title">Database Path Option (<span class="id">--db-path</span>)</div></div><div class="section-body"><div class="section-body-text">Cluster data directory.</div><div class="section-body-text">This should be the same as the <span class="br-setting">data_directory</span> setting in <span class="file">postgresql.conf</span>. Even though this value can be read from <span class="file">postgresql.conf</span> or the database cluster it is prudent to set it in case those resources are not available during a restore or offline backup scenario.<br/>
<br/>
The <span class="br-setting">db-path</span> option is tested against the value reported by <span class="postgres">PostgreSQL</span> on every online backup so it should always be current.</div><pre class="code-block">example: db-path=/data/db</pre></div></div><div class="section2"><a id="section-stanza/option-db-port"></a><div class="section2-header"><div class="section2-number">8.5</div><div class="section2-title">Database Port Option (<span class="id">--db-port</span>)</div></div><div class="section-body"><div class="section-body-text">Cluster port.</div><div class="section-body-text">Port that <span class="postgres">PostgreSQL</span> is running on. This usually does not need to be specified as most database clusters run on the default port.</div><pre class="code-block">default: 5432
example: db-port=6543</pre></div></div><div class="section2"><a id="section-stanza/option-db-socket-path"></a><div class="section2-header"><div class="section2-number">8.6</div><div class="section2-title">Database Socket Path Option (<span class="id">--db-socket-path</span>)</div></div><div class="section-body"><div class="section-body-text">Cluster unix socket path.</div><div class="section-body-text">The unix socket directory that was specified when <span class="postgres">PostgreSQL</span> was started. <span class="backrest">pgBackRest</span> will automatically look in the standard location for your OS so there usually no need to specify this setting unless the socket directory was explicitly modified with the <span class="br-setting">unix_socket_directory</span> setting in <span class="file">postgressql.conf</span>.</div><pre class="code-block">example: db-socket-path=/var/run/postgresql</pre></div></div><div class="section2"><a id="section-stanza/option-db-user"></a><div class="section2-header"><div class="section2-number">8.7</div><div class="section2-title">Database User Option (<span class="id">--db-user</span>)</div></div><div class="section-body"><div class="section-body-text">Cluster host logon user when <span class="br-setting">db-host</span> is set.</div><div class="section-body-text">This user will also own the remote <span class="backrest">pgBackRest</span> process and will initiate connections to <span class="postgres">PostgreSQL</span>. For this to work correctly the user should be the <span class="postgres">PostgreSQL</span> database cluster owner which is generally <span class="id">postgres</span>, the default.</div><pre class="code-block">default: postgres
example: db-user=db_owner</pre></div></div></div></div></div><div class="page-footer">Copyright &copy; 2015-2016, The PostgreSQL Global Development Group, <a href="https://github.com/pgbackrest/pgbackrest/blob/master/LICENSE">MIT License</a>.  Updated December 12, 2016</div></body></html>