diff --git a/pg_probackup/index.html b/pg_probackup/index.html index ab9114e..e7c4202 100644 --- a/pg_probackup/index.html +++ b/pg_probackup/index.html @@ -3,7 +3,7 @@ Description
pg_probackup — manage backup and recovery of PostgreSQL database clusters
pg_probackup
version
pg_probackup
help
[command
]
pg_probackup
init
-B
backup_dir
pg_probackup
add-instance
-B
backup_dir
-D
data_dir
--instance
instance_name
pg_probackup
del-instance
-B
backup_dir
--instance
instance_name
pg_probackup
set-config
-B
backup_dir
--instance
instance_name
[option
...]
pg_probackup
set-backup
-B
backup_dir
--instance
instance_name
-i
backup_id
[option
...]
pg_probackup
show-config
-B
backup_dir
--instance
instance_name
[--format=
]format
pg_probackup
show
-B
backup_dir
[option
...]
pg_probackup
backup
-B
backup_dir
--instance
instance_name
-b
backup_mode
[option
...]
pg_probackup
restore
-B
backup_dir
--instance
instance_name
[option
...]
pg_probackup
checkdb
-B
backup_dir
--instance
instance_name
-D
data_dir
[option
...]
pg_probackup
validate
-B
backup_dir
[option
...]
pg_probackup
merge
-B
backup_dir
--instance
instance_name
-i
backup_id
[option
...]
pg_probackup
delete
-B
backup_dir
--instance
instance_name
{ -i
backup_id
| --delete-wal
| --delete-expired
| --merge-expired
} [option
...]
pg_probackup
archive-push
-B
backup_dir
--instance
instance_name
--wal-file-path
wal_file_path
--wal-file-name
wal_file_name
[option
...]
pg_probackup
archive-get
-B
backup_dir
--instance
instance_name
--wal-file-path
wal_file_path
--wal-file-name
wal_file_name
[option
...]
pg_probackup
catchup
-b
catchup_mode
--source-pgdata
=path_to_pgdata_on_remote_server
--destination-pgdata
=path_to_local_dir
[option
...]
pg_probackup — manage backup and recovery of PostgreSQL database clusters
pg_probackup
version
pg_probackup
help
[command
]
pg_probackup
init
-B
backup_dir
pg_probackup
add-instance
-B
backup_dir
-D
data_dir
--instance
instance_name
pg_probackup
del-instance
-B
backup_dir
--instance
instance_name
pg_probackup
set-config
-B
backup_dir
--instance
instance_name
[option
...]
pg_probackup
set-backup
-B
backup_dir
--instance
instance_name
-i
backup_id
[option
...]
pg_probackup
show-config
-B
backup_dir
--instance
instance_name
[--format=
]format
pg_probackup
show
-B
backup_dir
[option
...]
pg_probackup
backup
-B
backup_dir
--instance
instance_name
-b
backup_mode
[option
...]
pg_probackup
restore
-B
backup_dir
--instance
instance_name
[option
...]
pg_probackup
checkdb
-B
backup_dir
--instance
instance_name
-D
data_dir
[option
...]
pg_probackup
validate
-B
backup_dir
[option
...]
pg_probackup
merge
-B
backup_dir
--instance
instance_name
-i
backup_id
[option
...]
pg_probackup
delete
-B
backup_dir
--instance
instance_name
{ -i
backup_id
| --delete-wal
| --delete-expired
| --merge-expired
} [option
...]
pg_probackup
archive-push
-B
backup_dir
--instance
instance_name
--wal-file-path
wal_file_path
--wal-file-name
wal_file_name
[option
...]
pg_probackup
archive-get
-B
backup_dir
--instance
instance_name
--wal-file-path
wal_file_path
--wal-file-name
wal_file_name
[option
...]
pg_probackup
catchup
-b
catchup_mode
--source-pgdata
=path_to_pgdata_on_remote_server
--destination-pgdata
=path_to_local_dir
[option
...]
pg_probackup is a utility to manage backup and @@ -84,7 +84,7 @@
Using pg_probackup, you can take full or incremental backups: -
+
FULL backups contain all the data files required to restore the database cluster.
@@ -94,13 +94,13 @@ It is also faster to restore the cluster by applying incremental backups than by replaying WAL files. pg_probackup supports the following modes of incremental backups: -
+
DELTA backup. In this mode, pg_probackup reads all data files in the data directory and copies only those pages that have changed since the previous backup. This mode can impose read-only I/O pressure equal to a full backup. -
+
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 @@ -112,7 +112,7 @@ takes less space. You have to configure WAL archiving as explained in Setting up continuous WAL archiving to make PAGE backups. -
+
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, @@ -173,7 +173,7 @@ parameters and have the same major release number. Depending on cluster configuration, PostgreSQL itself may apply additional restrictions, such as CPU architecture - or libc/libicu versions. + or libc/icu versions.
Once you have pg_probackup installed, complete the following @@ -310,7 +310,7 @@ GRANT EXECUTE ON FUNCTION pg_catalog.pg_control_checkpoint() TO backup; COMMIT;
- For PostgreSQL 10 or higher: + For PostgreSQL versions 10 — 14:
BEGIN; CREATE ROLE backup WITH LOGIN; @@ -328,6 +328,25 @@ GRANT EXECUTE ON FUNCTION pg_catalog.txid_snapshot_xmax(txid_snapshot) TO backup; GRANT EXECUTE ON FUNCTION pg_catalog.pg_control_checkpoint() TO backup; COMMIT; +
+ For PostgreSQL 15 or higher: +
+BEGIN; +CREATE ROLE backup WITH LOGIN; +GRANT USAGE ON SCHEMA pg_catalog TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.current_setting(text) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.set_config(text, text, boolean) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_is_in_recovery() TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_backup_start(text, boolean) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_backup_stop(boolean) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_create_restore_point(text) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_switch_wal() TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_last_wal_replay_lsn() TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.txid_current() TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.txid_current_snapshot() TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.txid_snapshot_xmax(txid_snapshot) TO backup; +GRANT EXECUTE ON FUNCTION pg_catalog.pg_control_checkpoint() TO backup; +COMMIT;
In the pg_hba.conf @@ -701,22 +720,11 @@
Where backup_mode
can take one of the
following values:
-
- FULL — creates a full backup that contains all the data - files of the cluster to be restored. -
- DELTA — reads all data files in the data directory and - creates an incremental backup for pages that have changed - since the previous backup. -
- PAGE — creates an incremental backup based on the WAL - files that have been generated since the previous full or - incremental backup was taken. Only changed blocks are read - from data files. -
- PTRACK — creates an incremental backup tracking page - changes on the fly. -
+ FULL
,
+ DELTA
,
+ PAGE
, and
+ PTRACK
.
+
When restoring a cluster from an incremental backup,
pg_probackup relies on the parent full backup and all the
incremental backups between them, which is called
@@ -2297,16 +2305,16 @@
pg_probackup catchup -b catchup_mode
--source-pgdata=path_to_pgdata_on_remote_server
--destination-pgdata=path_to_local_dir
--stream [connection_options
] [remote_options
]
Where catchup_mode
can take one of the
- following values: FULL
, DELTA
, or PTRACK
.
-
- FULL — creates a full copy of the PostgreSQL instance. + following values: +
+ FULL
— creates a full copy of the PostgreSQL instance.
The data directory of the destination instance must be empty for this mode.
-
- DELTA — reads all data files in the data directory and +
+ DELTA
— reads all data files in the data directory and
creates an incremental copy for pages that have changed
since the destination instance was shut down.
-
- PTRACK — tracking page changes on the fly, +
+ PTRACK
— tracking page changes on the fly,
only reads and copies pages that have changed since the point of divergence
of the source and destination instances.
@@ -2485,22 +2493,10 @@
-b mode
, --backup-mode=mode
Specifies the backup mode to use. Possible values are: - -
- FULL
— creates a full backup that contains all the data
- files of the cluster to be restored.
-
- DELTA
— reads all data files in the data directory and
- creates an incremental backup for pages that have changed
- since the previous backup.
-
- PAGE
— creates an incremental PAGE backup based on the WAL
- files that have changed since the previous full or
- incremental backup was taken.
-
- PTRACK
— creates an incremental PTRACK backup tracking
- page changes on the fly.
-
-C
, --smooth-checkpoint
Spreads out the checkpoint over a period of time. By default, pg_probackup tries to complete the checkpoint as soon as @@ -2890,22 +2886,9 @@
-b catchup_mode
, --backup-mode=catchup_mode
Specifies the catchup mode to use. Possible values are: - -
- FULL
— creates a full copy of the PostgreSQL instance.
-
- DELTA
— reads all data files in the data directory and
- creates an incremental copy for pages that have changed
- since the destination instance was shut down.
-
- PTRACK
— tracking page changes on the fly,
- only reads and copies pages that have changed since the point of divergence
- of the source and destination instances.
-
- PTRACK catchup mode requires PTRACK - not earlier than 2.0 and hence, PostgreSQL not earlier than 11. -
-
--source-pgdata=path_to_pgdata_on_remote_server
Specifies the path to the data directory of the instance to be copied. The path can be local or remote.
--destination-pgdata=path_to_local_dir
@@ -3690,9 +3673,9 @@