pg_probackup3 can store backups for multiple database clusters in a single backup catalog. To set up the required subdirectories, you must add a backup representation (instance) of each database cluster you are going to back up to the backup catalog.
Before adding a new backup instance, ensure that pg_probackup3 can connect to the database cluster you are going to back up. To add a new backup instance, run the following command:
pg_probackup3 add-instance -Bbackup_dir-Ddata_dir--instance=instance_name[remote_options]
Where:
data_dir is the data directory of the
cluster you are going to back up. To set up and use
pg_probackup3, write access to this
directory is required.
instance_name is the name of the
subdirectories that will store WAL and backup files for this
cluster.
remote_options
are optional parameters that need to be specified only if
data_dir is located
on a remote system.
pg_probackup3 creates the
instance_name subdirectories under the
backups/ and wal/ directories of
the backup catalog. The
backups/
directory contains the instance_namepg_probackup3.conf
configuration file that controls pg_probackup3
settings for this backup instance. If you run this command with the
remote_options, the
specified parameters will be added to pg_probackup3.conf.
For details on how to fine-tune pg_probackup3 configuration, see Section 2.4.
The user running pg_probackup3 must have full
access to backup_dir directory and at least
read-only access to data_dir directory. If you
specify the path to the backup catalog in the
BACKUP_PATH environment variable, you can
omit the corresponding option when running pg_probackup3
commands.
It is recommended to use the allow-group-access feature, so that backups can be done by any OS user in the same group as the cluster owner. In this case, the user should have read permissions for the cluster directory.