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 instance to the backup catalog for each 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:

  • 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/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 the section called “Configuring pg_probackup3.

The user launching 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.