Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit833f31d

Browse files
committed
Documentation: update
1 parent884da1c commit833f31d

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

‎Documentation.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ pg_probackup is a utility to manage backup and recovery of PostgreSQL database c
55
Current version - 2.1.3
66

77
1.[Synopsis](#synopsis)
8-
2.[Overview](#overview)
9-
*[Versioning](#versioning)
8+
2.[Versioning](#versioning)
9+
3.[Overview](#overview)
10+
*[Backup modes](#backup-modes)
11+
*[WAL methods](#wal-methods)
1012
*[Limitations](#limitations)
1113

12-
3.[Installation and Setup](#installation-and-setup)
14+
4.[Installation and Setup](#installation-and-setup)
1315
*[Initializing the Backup Catalog](#initializing-the-backup-catalog)
1416
*[Adding a New Backup Instance](#adding-a-new-backup-instance)
1517
*[Configuring the Database Cluster](#configuring-the-database-cluster)
@@ -19,7 +21,7 @@ Current version - 2.1.3
1921
*[Setting up Cluster Verification](#setting-up-cluster-verification)
2022
*[Setting up PTRACK Backups](#setting-up-ptrack-backups)
2123

22-
4.[Command-Line Reference](#command-line-reference)
24+
5.[Command-Line Reference](#command-line-reference)
2325
*[Commands](#commands)
2426
*[version](#version)
2527
*[help](#help)
@@ -52,7 +54,7 @@ Current version - 2.1.3
5254
*[Remote Mode Options](#remote-mode-options)
5355
*[Replica Options](#replica-options)
5456

55-
5.[Usage](#usage)
57+
6.[Usage](#usage)
5658
*[Creating a Backup](#creating-a-backup)
5759
*[Verifying a Cluster](#verifying-a-cluster)
5860
*[Validating a Backup](#validating-a-backup)
@@ -66,8 +68,8 @@ Current version - 2.1.3
6668
*[Merging Backups](#merging-backups)
6769
*[Deleting Backups](#deleting-backups)
6870

69-
6.[Authors](#authors)
70-
7.[Credits](#credits)
71+
7.[Authors](#authors)
72+
8.[Credits](#credits)
7173

7274

7375
##Synopsis
@@ -104,6 +106,11 @@ Current version - 2.1.3
104106

105107
`pg_probackup archive-get -B backup_dir --instance instance_name --wal-file-path %p --wal-file-name %f`
106108

109+
110+
##Versioning
111+
112+
pg_probackup is following[semantic](https://semver.org/) versioning.
113+
107114
##Overview
108115

109116
As compared to other backup solutions, pg_probackup offers the following benefits that can help you implement different backup strategies and deal with large amounts of data:
@@ -122,23 +129,23 @@ As compared to other backup solutions, pg_probackup offers the following benefit
122129

123130
To manage backup data, pg_probackup creates a`backup catalog`. This is a directory that stores all backup files with additional meta information, as well as WAL archives required for point-in-time recovery. You can store backups for different instances in separate subdirectories of a single backup catalog.
124131

132+
###Backup Modes
133+
125134
Using pg_probackup, you can take full or incremental backups:
126135

127136
- FULL backups contain all the data files required to restore the database cluster.
128137
- Incremental backups only store the data that has changed since the previous backup. It allows to decrease the backup size and speed up backup and restore operations. pg_probackup supports the following modes of incremental backups:
129138
- DELTA backup. In this mode, pg_probackup reads all data files in the data directory and copies only those pages that has changed since the previous backup. Note that this mode can impose read-only I/O pressure equal to a full backup.
130139
- PAGE backup. In this mode, pg_probackup scans all WAL files in the archive from the moment the previous full or incremental backup was taken. Newly created backups contain only the pages that were mentioned in WAL records. This requires all the WAL files since the previous backup to be present in the WAL archive. If the size of these files is comparable to the total size of the database cluster files, speedup is smaller, but the backup still takes less space. You have to configure WAL archiving as explained in the section[Setting up continuous WAL archiving](#setting-up-continuous-wal-archiving) to make PAGE backups.
131-
- PTRACK backup. In this mode, PostgreSQL tracks page changes on the fly. Continuous archiving is not necessary for it to operate. Each time a relation page is updated, this page is marked in a special PTRACK bitmap for this relation. As one page requires just one bit in the PTRACK fork, such bitmaps are quite small. Tracking implies some minor overhead on the database server operation, but speeds up incremental backups significantly.
140+
- PTRACK backup. In this mode, PostgreSQL tracks page changes on the fly. Continuous archiving is not necessary for it to operate. Each time a relation page is updated, this page is marked in a special PTRACK bitmap for this relation. As one page requires just one bit in the PTRACK fork, such bitmaps are quite small. Tracking implies some minor overhead on the database server operation, but speeds up incremental backups significantly.
141+
142+
###WAL methods
132143

133-
pg_probackup can take only physical online backups, and online backups require WAL for consistent recovery. So regardless of the chosen`backup mode` (FULL, PAGE, DELTA, etc),all backups taken with pg_probackup must use one of the following`WAL delivery methods`:
144+
pg_probackup can take only physical online backups, and online backups require WAL for consistent recovery. So regardless of the chosen[backup mode](#backup-modes) (FULL, PAGE or DELTA),any backup taken with pg_probackup must use one of the following`WAL delivery methods`:
134145

135146
- ARCHIVE. Such backups rely on[continuous archiving](#setting-up-continuous-wal-archiving) to ensure consistent recovery. This is the default WAL delivery method.
136147
- STREAM. Such backups include all the files required to restore the cluster to a consistent state at the time the backup was taken. Regardless of[continuous archiving](#setting-up-continuous-wal-archiving) been set up or not, the WAL segments required for consistent recovery are streamed (hence STREAM) via replication protocol during backup and included into the backup files.
137148

138-
###Versioning
139-
140-
pg_probackup is following[semantic](https://semver.org/) versioning.
141-
142149
###Limitations
143150

144151
pg_probackup currently has the following limitations:
@@ -284,11 +291,13 @@ ARCHIVE backups require [continious WAL archiving](https://www.postgresql.org/do
284291

285292
archive_command = 'pg_probackup archive-push -B backup_dir --instance instance_name --wal-file-path %p --wal-file-name %f [remote_options]'
286293

287-
Where*backup_dir* and*instance_name* refer to the already initialized backup catalog instance for this database cluster and optional parameters[remote_options](#remote-mode-options) should be used to archive WAL to the remote machine.
294+
Where*backup_dir* and*instance_name* refer to the already initialized backup catalog instance for this database cluster and optional parameters[remote_options](#remote-mode-options) should be used to archive WAL to the remote machine. For details about all possible`archive-push` parameters, see the section[archive-push](#archive-push).
288295

289296
Once these steps are complete, you can start taking FULL, PAGE, DELTA and PTRACK backups in ARCHIVE mode.
290297

291-
>NOTE: Instead of`archive_mode`+`archive_command` method you may opt to use the utility[pg_receivewal](https://www.postgresql.org/docs/current/app-pgreceivewal.html). In this case pg_receivewal`-D directory` option should point to '*backup_dir*/wal/*instance_name*' directory. WAL compression that could be done by pg_receivewal is supported by pg_probackup.`Zero data loss` archive strategy can be achieved only by using pg_receivewal.
298+
>NOTE: Instead of`archive_mode`+`archive_command` method you may opt to use the utility[pg_receivewal](https://www.postgresql.org/docs/current/app-pgreceivewal.html). In this case pg_receivewal`-D directory` option should point to '*backup_dir*/wal/*instance_name*' directory. WAL compression that could be done by pg_receivewal is supported by pg_probackup.`Zero Data Loss` archive strategy can be achieved only by using pg_receivewal.
299+
300+
>NOTE: using pg_probackup command[archive-push](#archive-push) for continious archiving is optional. You can use any other tool you like as long as it delivers WAL segments into '*backup_dir*/wal/*instance_name*' directory. If compression is used, it should be gzip and '.gz' suffix is mandatory.
292301
293302
###Backup from Standby
294303

@@ -1015,13 +1024,15 @@ If `-i/--backup-id` option is omitted, pg_probackup automatically chooses the ba
10151024

10161025
pg_probackup supports the remote mode that allows to perform`backup` and`restore` operations remotely via SSH. In this mode, the backup catalog is stored on a local system, while PostgreSQL instance to be backed up is located on a remote system. You must have pg_probackup installed on both systems.
10171026

1027+
Do note that pg_probackup rely on passwordless SSH connection for communication between the hosts.
1028+
10181029
The typical workflow is as follows:
10191030

1020-
- On yourlocal system, configure pg_probackup as explained in the section[Installation and Setup](#installation-and-setup). For the[add-instance](#add-instance) and[set-config](#set-config) commands, make sure to specify[remote options](#remote-mode-options) that point to theremote server with the PostgreSQL instance.
1031+
- On yourbackup host, configure pg_probackup as explained in the section[Installation and Setup](#installation-and-setup). For the[add-instance](#add-instance) and[set-config](#set-config) commands, make sure to specify[remote options](#remote-mode-options) that point to thedatabase host with the PostgreSQL instance.
10211032

1022-
- If you would like to take ARCHIVE backups,configure continuous WAL archivingontheremote system as explained in the section[Setting up continuous WAL archiving](#setting-up-continuous-wal-archiving). For the[archive-push](#archive-push) and[archive-get](#archive-get) commands, you must specify the[remote options](#remote-mode-options) that point to host with backup catalog.
1033+
- If you would like to takeremote backup in[PAGE](#backup-modes) mode, or rely on[ARCHIVE](#wal-methods) WAL delivery method, or use[PITR](#performing-point-in-time-pitr-recovery), thenconfigure continuous WAL archivingfrom database host tothebackup host as explained in the section[Setting up continuous WAL archiving](#setting-up-continuous-wal-archiving). For the[archive-push](#archive-push) and[archive-get](#archive-get) commands, you must specify the[remote options](#remote-mode-options) that point to backup host with backup catalog.
10231034

1024-
- Run[backup](#backup) or[restore](#restore) commands with remote options onsystem withbackupcatalog. 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.
1035+
- Run[backup](#backup) or[restore](#restore) commands with[remote options](#remote-mode-options) on backuphost. 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.
10251036

10261037
>NOTE: The remote backup mode is currently unavailable for Windows systems.
10271038

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp