2.3. Adding a New Backup Instance #

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 -B backup_dir -D data_dir --instance=instance_name [remote_options]

Where:

pg_probackup3 creates the instance_name subdirectories under the backups/ and wal/ directories of the backup catalog. The backups/instance_name directory contains the pg_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.

Note

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.