New features:
-
Remote backup and restore using
SSH
. It uses an operation model when backup catalog is located on local machine, whilePostgreSQL
is located on remote machine, the only exceptions arearchive-push
andarchive-get
commands which are always launched from database server side. For remote mode to work a localssh
binary is used. All--remote-*
and--ssh-*
options can be used withadd-instance
,set-config
,backup
,restore
,archive-push
andarchive-get
commands. Currently remote operations are not supported on Windows.- Option
--remote-proto
allows to specify a protocol to use for remote operations. Currently onlyssh
andnone
values are supported. If option--remote-host
is specified then default value for--remote-proto
isssh
. - Option
--remote-host
allows to specify remote host IP address or hostname to connect in remote mode. - Option
--remote-port
allows to specify remote host port to connect in remote mode. Default value:22
. - Option
--remote-user
allows to specify remote host user to connect in remote mode. Default value: current user. - Option
--remote-path
allows to specify a directory path with pg_probackup binary on remote machine. - Option
--ssh-options
allows to specify a string of options forssh
. Default:none
.
- Option
-
Merge partially-expired incremental chains during backups retention purge. This is the analog of Oracle
Incrementally Updated Backups
feature.- Flag
--merge-expired
allows to merge partially-expired incremental backup chains. Can be used only ifretention-window
policy is set. Can be safely used with--delete-expired
flag. Can be used only withbackup
anddelete
commands. - Flag
--dry-run
allows to perform a trial retention run without any changes. Can be used only withbackup
anddelete
commands.
- Flag
-
Support of external directories. It can be used for adding to backup any files and directories located outside of PGDATA, e.g. configs, logs or scripts.
- Option
--external-dirs
allows to specify multiple directories separated by colon that should be copied during backup. Default value: 'none'. Can be used only withset-config
andbackup
commands. Example:--external-dirs=/etc/postgresql/9.6:/opt/scripts
. - Option
--external-mapping
similarly to option--tablespace-mapping
allows to relocate specified external directory to a new location duringrestore
.Can be specified multiple times. Can be used only withrestore
command. Example:--external-mapping=/etc/postgresql/9.6=/tmp/configs --external-mapping=/opt/scripts=/tmp/scripts
- Flag
--skip-external-dirs
allows to skip restoring of external directories duringrestore
. Can be used only withrestore
command.
- Option
-
New command
checkdb
provides additional facilities to check yourPostgreSQL
instance. It allows to validate all data files located in PGDATA via block checksums matching and page header sanity checks. Optionally all indexes in all databases in PostgreSQL instance can be logically verified using extensionsamcheck
oramcheck_next
.- Flag
--amcheck
allows logical verification of all indexes in specified PostgreSQL instance if no corruption was found during data files checking. It requires eitheramcheck
oramcheck_next
extension to be available. Uses bt_index_check() function from said extensions. - Flag
--skip-block-validation
, which already exists invalidate
command, completely disables data files validation. Can be used only with--amcheck
flag. - Flag
--heapallindexed
allows to check that all heap tuples that should be indexed are actually indexed. Can be used for PG11 or, ifamcheck_next
extension is installed, for any PG version. Can be used only with--amcheck
flag.
- Flag
-
Flag
--temp-slot
allows user to use temporary replication slot for STREAM backups. Default temp slot name ispg_probackup_slot
which can be changed via--slot
option.
Improvements:
- Windows support is now considered stable.
- Additional support of threads by
validate
command. Now it use multiple threads defined by-j
option for checking WAL files. - Flag
--no-validate
can now be used withbackup
command. It allows not to force validation after successful backup. - Now invalid backups will be deleted during retention purge, if they are not guarded by retention.
- Show merge time after backup merging by
show
command. - Options
--master-*
and--replica-timeout
are deprecated. Deprecated options are still usable for the purpose of backward compatibility. - Now an absolute path to
pg_probackup
binary is used inrestore_command
option ofrecovery.conf
file generated byrestore
command. - Options
--time
,--xid
,--lsn
,--timeline
and flags--inclusive
,--immediate
are deprecated. Use--recovery-target-time
,--recovery-target-xid
,--recovery-target-lsn
,--recovery-target-inclusive
,--recovery-target-timeline
and--recovery-target
options instead. Deprecated options and flags are still usable for the purpose of backward compatibility. - Option
--recovery-target
has two allowed values:immediate
which is identical to deprecated flag--immediate
andlatest
which stands for default recovery behavior - recover to the end of the all available WAL log. - Usage of parent_link in
merge
,restore
andbackup
commands instead of time sorting makes incremental chains more robust to time lapses and other anomalies.
Bugfixes:
- Update program_version of the target backup, recalculate CRC of a unchanged file after
merge
command. - Changing backup metadata is now atomic.
- During
merge
command destination backup now inherit WAL mode from parent. - Allow to delete backups with missing or emtpy
.control
files. - More lenient handling of
.rotation
file been empty or containing garbage, WARNING is issued now instead of ERROR.