You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
pg_probackup is following[semantic](https://semver.org/) versioning.
113
+
107
114
##Overview
108
115
109
116
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
122
129
123
130
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.
124
131
132
+
###Backup Modes
133
+
125
134
Using pg_probackup, you can take full or incremental backups:
126
135
127
136
- FULL backups contain all the data files required to restore the database cluster.
128
137
- 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:
129
138
- 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.
130
139
- 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
132
143
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`:
134
145
135
146
- ARCHIVE. Such backups rely on[continuous archiving](#setting-up-continuous-wal-archiving) to ensure consistent recovery. This is the default WAL delivery method.
136
147
- 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.
137
148
138
-
###Versioning
139
-
140
-
pg_probackup is following[semantic](https://semver.org/) versioning.
141
-
142
149
###Limitations
143
150
144
151
pg_probackup currently has the following limitations:
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).
288
295
289
296
Once these steps are complete, you can start taking FULL, PAGE, DELTA and PTRACK backups in ARCHIVE mode.
290
297
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.
292
301
293
302
###Backup from Standby
294
303
@@ -1015,13 +1024,15 @@ If `-i/--backup-id` option is omitted, pg_probackup automatically chooses the ba
1015
1024
1016
1025
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.
1017
1026
1027
+
Do note that pg_probackup rely on passwordless SSH connection for communication between the hosts.
1028
+
1018
1029
The typical workflow is as follows:
1019
1030
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.
1021
1032
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.
1023
1034
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.
1025
1036
1026
1037
>NOTE: The remote backup mode is currently unavailable for Windows systems.