|
1 |
| -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
2 | 1 | <h1 id="pg_probackup">pg_probackup</h1>
|
3 | 2 | <p>pg_probackup is a utility to manage backup and recovery of PostgreSQL database clusters. It is designed to perform periodic backups of the PostgreSQL instance that enable you to restore the server in case of a failure. pg_probackup supports PostgreSQL 9.5 or higher.</p>
|
4 | 3 | <p>Current version - 2.1.5</p>
|
@@ -437,6 +436,9 @@ <h3 id="using-pg_probackup-in-the-remote-mode">Using pg_probackup in the Remote
|
437 | 436 | <li><p>If you would like to take remote backup in <a href="#creating-a-backup">PAGE</a> mode, or rely on <a href="#archive-mode">ARCHIVE</a> WAL delivery mode, or use <a href="#performing-point-in-time-pitr-recovery">PITR</a>, then configure continuous WAL archiving from database host to the backup host as explained in the section <a href="#setting-up-continuous-wal-archiving">Setting up continuous WAL archiving</a>. For the <a href="#archive-push">archive-push</a> and <a href="#archive-get">archive-get</a> commands, you must specify the <a href="#remote-mode-options">remote options</a> that point to backup host with backup catalog.</p></li>
|
438 | 437 | <li><p>Run <a href="#backup">backup</a> or <a href="#restore">restore</a> commands with <a href="#remote-mode-options">remote options</a> <strong>on backup host</strong>. pg_probackup connects to the remote system via SSH and creates a backup locally or restores the previously taken backup on the remote system, respectively.</p></li>
|
439 | 438 | </ul>
|
| 439 | +<p>For example, to create archive full backup using remote mode via ssh, run:</p> |
| 440 | +<pre><code>pg_probackup backup -B backup_dir --instance instance_name -b FULL --remote-host=192.168.0.2 --remote-user=postgres</code></pre> |
| 441 | +<p>For example, to restore backup on remote system using ssh, run:</p> |
440 | 442 | <blockquote>
|
441 | 443 | <p>NOTE: The remote backup mode is currently unavailable for Windows systems.</p>
|
442 | 444 | </blockquote>
|
@@ -700,17 +702,29 @@ <h4 id="backup">backup</h4>
|
700 | 702 | <li>FULL — creates a full backup that contains all the data files of the cluster to be restored.</li>
|
701 | 703 | <li>DELTA — reads all data files in the data directory and creates an incremental backup for pages that have changed since the previous backup.</li>
|
702 | 704 | <li>PAGE — creates an incremental PAGE backup based on the WAL files that have changed since the previous full or incremental backup was taken.</li>
|
703 |
| -<li><p>PTRACK — creates an incremental PTRACK backup tracking page changes on the fly.</p> |
704 |
| -<p>-C –smooth-checkpoint Spreads out the checkpoint over a period of time. By default, pg_probackup tries to complete the checkpoint as soon as possible.</p> |
705 |
| -<p>–stream Makes an <a href="#stream-mode">STREAM</a> backup that includes all the necessary WAL files by streaming them from the database server via replication protocol.</p> |
706 |
| -<p>–temp-slot Creates a temporary physical replication slot for streaming WAL from the backed up PostgreSQL instance. It ensures that all the required WAL segments remain available if WAL is rotated while the backup is in progress. This flag can only be used together with the <code>--stream</code> flag. Default slot name is <code>pg_probackup_slot</code>, which can be changed via option <code>--slot/-S</code>.</p> |
707 |
| -<p>-S slot_name –slot=slot_name Specifies the replication slot for WAL streaming. This option can only be used together with the <code>--stream</code> flag.</p> |
708 |
| -<p>–backup-pg-log Includes the log directory into the backup. This directory usually contains log messages. By default, log directory is excluded.</p> |
709 |
| -<p>-E external_directory_path –external-dirs=external_directory_path Includes the specified directory into the backup. This option is useful to back up scripts, sql dumps and configuration files located outside of the data directory. If you would like to back up several external directories, separate their paths by a colon on Unix and a semicolon on Windows.</p> |
710 |
| -<p>–archive-timeout=wait_time Sets in seconds the timeout for WAL segment archiving and streaming. By default pg_probackup waits 300 seconds.</p> |
711 |
| -<p>–skip-block-validation Disables block-level checksum verification to speed up backup.</p> |
712 |
| -<p>–no-validate Skips automatic validation after successfull backup. You can use this flag if you validate backups regularly and would like to save time when running backup operations.</p></li> |
| 705 | +<li>PTRACK — creates an incremental PTRACK backup tracking page changes on the fly.</li> |
713 | 706 | </ul>
|
| 707 | +<pre><code>-C |
| 708 | +--smooth-checkpoint</code></pre> |
| 709 | +<p>Spreads out the checkpoint over a period of time. By default, pg_probackup tries to complete the checkpoint as soon as possible.</p> |
| 710 | +<pre><code>--stream</code></pre> |
| 711 | +<p>Makes an <a href="#stream-mode">STREAM</a> backup that includes all the necessary WAL files by streaming them from the database server via replication protocol.</p> |
| 712 | +<pre><code>--temp-slot</code></pre> |
| 713 | +<p>Creates a temporary physical replication slot for streaming WAL from the backed up PostgreSQL instance. It ensures that all the required WAL segments remain available if WAL is rotated while the backup is in progress. This flag can only be used together with the <code>--stream</code> flag. Default slot name is <code>pg_probackup_slot</code>, which can be changed via option <code>--slot/-S</code>.</p> |
| 714 | +<pre><code>-S slot_name |
| 715 | +--slot=slot_name</code></pre> |
| 716 | +<p>Specifies the replication slot for WAL streaming. This option can only be used together with the <code>--stream</code> flag.</p> |
| 717 | +<pre><code>--backup-pg-log</code></pre> |
| 718 | +<p>Includes the log directory into the backup. This directory usually contains log messages. By default, log directory is excluded.</p> |
| 719 | +<pre><code>-E external_directory_path |
| 720 | +--external-dirs=external_directory_path</code></pre> |
| 721 | +<p>Includes the specified directory into the backup. This option is useful to back up scripts, sql dumps and configuration files located outside of the data directory. If you would like to back up several external directories, separate their paths by a colon on Unix and a semicolon on Windows.</p> |
| 722 | +<pre><code>--archive-timeout=wait_time</code></pre> |
| 723 | +<p>Sets in seconds the timeout for WAL segment archiving and streaming. By default pg_probackup waits 300 seconds.</p> |
| 724 | +<pre><code>--skip-block-validation</code></pre> |
| 725 | +<p>Disables block-level checksum verification to speed up backup.</p> |
| 726 | +<pre><code>--no-validate</code></pre> |
| 727 | +<p>Skips automatic validation after successfull backup. You can use this flag if you validate backups regularly and would like to save time when running backup operations.</p> |
714 | 728 | <p>Additionally <a href="#connection-options">Connection Options</a>, <a href="#retention-options">Retention Options</a>, <a href="#remote-mode-options">Remote Mode Options</a>, <a href="#compression-options">Compression Options</a>, <a href="#logging-options">Logging Options</a> and <a href="#common-options">Common Options</a> can be used.</p>
|
715 | 729 | <p>For details on usage, see the section <a href="#creating-a-backup">Creating a Backup</a>.</p>
|
716 | 730 | <h4 id="restore">restore</h4>
|
|
0 commit comments