Performing PITR and making backups with the ARCHIVE WAL delivery mode require continuous WAL archiving to be enabled. To set up continuous archiving in the cluster, complete the following steps:
Make sure the
wal_level
parameter is higher than minimal.
If you are configuring archiving on the primary,
archive_mode
must be set to on or
always.
Set the archive_command parameter, as follows:
archive_command = '"install_dir/pg_probackup3" archive-push -B "backup_dir" --instance=instance_name--wal-file-name=%f [ssh_options]'
where install_dir is the
installation directory of the pg_probackup3
version you are going to use, backup_dir and
instance_name refer to the already
initialized backup catalog instance for this database cluster,
and SSH options
only need to be specified to archive WAL on a remote host. For details about all
possible archive-push parameters, see the
section archive-push.
Once these steps are complete, you can start making backups in the ARCHIVE WAL mode as well as perform PITR.
You can view the current state of the WAL archive using the show command. For details, see Section 3.3.2.
Instead of using the archive-push
command provided by pg_probackup3, you can use
any other tool to set up continuous archiving as long as it delivers WAL segments into
directory. If compression is used, it should be
backup_dir/wal/instance_namegzip, and .gz suffix in filename is
mandatory.
Instead of configuring continuous archiving by setting the
archive_mode and archive_command
parameters, you can opt for using the
pg_receivewal
utility. In this case, pg_receivewal -D
option should point to
directory
directory. pg_probackup3 supports WAL compression
that can be done by pg_receivewal.
“Zero Data Loss” archive strategy can be
achieved only by using pg_receivewal.
backup_dir/wal/instance_name