58.2. Storages #
58.2.1. Creating a Storage #
58.2.1.1. Creating a Local Storage #
In the navigation panel, go to Backup → Storages.
In the top-right corner of the page, click Add storage.
Select Local storage, and then click Next.
Specify parameters of the new local storage (parameters marked with an asterisk are required):
Name.
Backup catalog: The path to the local storage catalog where backups are located.
If you enter a path to a non-existing catalog, the catalog is created.
System user: The operating system user that owns the backup catalog.
Instance: The instance that is bound to the storage. When an instance is bound to a storage, the backup catalog for this instance is created in the storage.
You cannot bind an instance to the same storage twice. If an instance is bound for the second time, it is unbound from the previous storage.
It is recommended to specify in System user the operating system user that owns files and catalogs of the bound instance and on behalf of which the instance service runs, because this user must have read and write privileges in the backup catalog. In most cases, it is the
postgresuser.Remote mode: Specifies whether to use the remote mode for the storage.
If you enable this toggle, specify the following parameters:
Remote server IP and Port: The IP address and port number of the remote server where the bound instance is installed.
User: The operating system user that owns files and catalogs of the bound instance and on behalf of which the instance service runs. In most cases, it is the
postgresuser.Storage server: The server where the storage is created.
Important
An agent must be installed on the server. Otherwise, the storage is not created.
SSH parameters: SSH options.
In pg_probackup, these options are specified using the
--ssh-optionsremote option.To add an option, click Add, and then specify the option and its value.
You can add multiple options.
Storage parameters: Storage parameters of the backup catalog.
Available parameters:
Full backups, pcs.: The maximum number of full backups.
For example, if you enter
3, the catalog can contain a maximum of three full backups.To disable this limitation, enter
0. In this case, the number of backups in the catalog is not limited.Retention window, days: The number of days (24 hours) covered by backups.
For example, if you enter
7, the catalog must always contain backups required for restoring the data for the last seven days, including today.To disable this limitation, enter
0. In this case, backups can be deleted from the catalog at any moment.WAL depth, pcs.: The minimum number of backups on each timeline. Having backups on all timelines is required for point-in-time recovery (PITR).
For example, if you enter
3, the catalog must always contain at least three backups on each timeline.To disable this limitation, enter
0. In this case, point-in-time recovery is not available.Expired copies: The management policy for expired backups.
Possible values:
Merge: Merge expired backups with new ones if possible.
Delete: Delete expired backups from the catalog.
You can enable all checkboxes simultaneously.
Full backups, pcs, Retention window, days, and WAL depth, pcs are applied only if you enable Merge and/or Delete in Expired copies.
Values of Full backups, pcs. and Retention window, days are considered simultaneously when deleting expired backups from the catalog.
For example, if you enter
3in Full backups, pcs. and7in Retention window, days, a maximum of three full backups are saved, as well as all backups required for restoring the data for the past seven days, including today.The following priority is applied:
backup parameters are applied first
instance parameters are applied second
storage parameters are applied third
For more information about storage parameters, refer to the official Postgres Pro documentation on pg_probackup.
Click Add.
58.2.1.2. Creating an S3 Storage #
In the navigation panel, go to Backup → Storages.
In the top-right corner of the page, click Add storage.
Select S3 storage, and then click Next.
Specify parameters of the new S3 storage (parameters marked with an asterisk are required):
Name.
Type: The provider of the S3 storage.
Possible values:
AWS
Minio
VK
Host: The server where commands for interactions between the manager and S3 storage are executed.
Server: The network address of the S3 storage server.
Protocol HTTPS: Specifies whether HTTPS is used for interactions between the manager and S3 storage.
Port: The port number for connecting the manager to the S3 storage.
Access Key ID and Secret access key: Secure keys for connecting the manager to the S3 storage.
Bucket: The name of the bucket on the S3 storage server where backups are located.
Region: The region where the S3 storage server is located.
Backup catalog: The path to the bucket catalog where backups are located.
Instance: The instance that is bound to the storage. When an instance is bound to a storage, the backup catalog for this instance is created in the storage.
You cannot bind an instance to the same storage twice. If an instance is bound for the second time, it is unbound from the previous storage.
Storage parameters: Storage parameters of the backup catalog.
Available parameters:
Full backups, pcs.: The maximum number of full backups.
For example, if you enter
3, the catalog can contain a maximum of three full backups.To disable this limitation, enter
0. In this case, the number of backups in the catalog is not limited.Retention window, days: The number of days (24 hours) covered by backups.
For example, if you enter
7, the catalog must always contain backups required for restoring the data for the last seven days, including today.To disable this limitation, enter
0. In this case, backups can be deleted from the catalog at any moment.WAL depth, pcs.: The minimum number of backups on each timeline. Having backups on all timelines is required for point-in-time recovery (PITR).
For example, if you enter
3, the catalog must always contain at least three backups on each timeline.To disable this limitation, enter
0. In this case, point-in-time recovery is not available.Expired copies: The management policy for expired backups.
Possible values:
Merge: Merge expired backups with new ones if possible.
Delete: Delete expired backups from the catalog.
You can enable all checkboxes simultaneously.
Full backups, pcs, Retention window, days, and WAL depth, pcs are applied only if you enable Merge and/or Delete in Expired copies.
Values of Full backups, pcs. and Retention window, days are considered simultaneously when deleting expired backups from the catalog.
For example, if you enter
3in Full backups, pcs. and7in Retention window, days, a maximum of three full backups are saved, as well as all backups required for restoring the data for the past seven days, including today.The following priority is applied:
backup parameters are applied first
instance parameters are applied second
storage parameters are applied third
For more information about storage parameters, refer to the official Postgres Pro documentation on pg_probackup.
Click Add.
58.2.2. Viewing Storages #
58.2.2.1. Viewing Local Storages #
In the navigation panel, go to Backup → Storages.
The table of local storages with the following columns will be displayed:
Name.
Instance: The instance that is bound to the storage. When an instance is bound to a storage, the backup catalog for this instance is created in the storage.
Catalog: The path to the backup catalog.
Full backups, pcs.: The maximum number of full backups.
Retention window, days: The number of days (24 hours) covered by backups.
WAL depth, pcs.: The minimum number of backups on each timeline. Having backups on all timelines is required for point-in-time recovery (PITR).
Expired copies: The management policy for expired backups.
Possible values:
Disabled: Do not perform any actions with expired backups.
Merge: Merge expired backups with new ones if possible.
Delete: Delete expired backups from the catalog.
58.2.2.2. Viewing S3 Storages #
In the navigation panel, go to Backup → Storages.
Select S3 storages.
The table of S3 storages with the following columns will be displayed:
Name.
Parameters:
Type: The provider of the S3 storage.
Possible values:
AWS
Minio
VK
Host: The server where commands for interactions between the manager and S3 storage are executed.
Port: The port number for connecting the manager to the S3 storage.
Bucket: The name of the bucket on the S3 storage server where backups are located.
Region: The region where the S3 storage server is located.
Full backups, pcs.: The maximum number of full backups.
Retention window, days: The number of days (24 hours) covered by backups.
WAL depth, pcs.: The minimum number of backups on each timeline. Having backups on all timelines is required for point-in-time recovery (PITR).
Expired copies: The management policy for expired backups.
Possible values:
Disabled: Do not perform any actions with expired backups.
Merge: Merge expired backups with new ones if possible.
Delete: Delete expired backups from the catalog.
58.2.3. Editing a Storage #
58.2.3.1. Editing a Local Storage #
In the navigation panel, go to Backup → Storages.
Click
next to the storage.
Edit local storage parameters.
Click Save.
58.2.3.2. Editing an S3 Storage #
In the navigation panel, go to Backup → Storages.
Select S3 storages.
Click
next to the storage.
Edit S3 storage parameters.
Click Save.
58.2.4. Deleting a Storage #
58.2.4.1. Deleting a Local Storage #
In the navigation panel, go to Backup → Storages.
Click
next to the storage.
Select one of the following values:
Delete only from repository: Delete the storage from the repository and web application.
When the agent is restarted on the server, the storage is automatically recreated in the web application.
Recursively delete all backups and storage: Delete the storage and its backup catalog from the repository, web application, and server.
Important
If you select this value, the deleted storage cannot be restored.
Confirm the operation and click Delete.
58.2.4.2. Deleting an S3 Storage #
In the navigation panel, go to Backup → Storages.
Select S3 storages.
Click
next to the storage.
Select one of the following values:
Delete only from repository: Delete the storage from the repository and web application.
When the agent is restarted on the server, the storage is automatically recreated in the web application.
Recursively delete all backups and storage: Delete the storage and its backup catalog from the repository, web application, and server.
Important
If you select this value, the deleted storage cannot be restored.
Confirm the operation and click Delete.