58.4. Backups #
58.4.1. Creating a Backup #
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
In the top-right corner of the page, click Create backup.
Specify parameters of the new backup (parameters marked with an asterisk are required):
Instance: The instance for which the backup is created.
Storage: The storage where the backup is located.
You can use a local or S3 storage. The local storage must be located on the same server as the instance for which the backup is created.
If the remote mode is used for the selected storage, the following parameters are displayed:
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.
User and Password: The name and password of the DBMS user on behalf of which the backup is created.
Database: The database for connecting to the instance.
Backup mode: The backup creation mode.
Possible values:
FULL
PAGE
PTRACK
DELTA
For more information about backup modes, refer to the official Postgres Pro documentation on pg_probackup.
Threads: The number of parallel threads that are started at backup creation.
Waiting (sec): The waiting timeout in seconds for WAL segment archiving and streaming.
Create a standalone backup: Specifies whether to create a streaming backup that includes WAL records required for restoring the instance later.
Replication slot: The replication slot that is used for transferring WAL records.
Create temporary replication slot: Specifies whether to create a temporary replication slot for transferring WAL records of the instance for which the backup is created.
If you enable this checkbox, WAL segments are available even when they are switched at backup creation.
Click Next, and then specify additional parameters if required:
External directories: The path to directories located outside of the instance data directory that are also included in the backup.
You can enter multiple directories separated by commas.
Include log catalog: Specifies whether the backup includes the catalog with instance activity logs.
Don't check copy: Specifies whether to skip the automatic verification of the created backup.
If you enable this checkbox, the backup is created faster.
Smooth execution of the checkpoint: Specifies whether backup creation starts only after the scheduled checkpoint.
Disable block-level verification: Specifies whether to disable the block-level checksum verification for faster consistency checking at backup creation.
Log level: The logging level at backup creation.
Each level includes all the levels that follow it. The lower the level, the fewer messages are sent. The off level disables logging.
PPEM displays all possible values. However, supported values depend on the installed pg_probackup version:
Table 58.1. Supported Log Level Values
Log level
verboseloginfonoticewarningerroroff2.8.10 or higher
Yes
Yes
Yes
Yes
No
No
No
2.8.9 or higher
Yes
Yes
Yes
No
No
No
No
If an unsupported value is selected, a warning is displayed, and the verbose value is selected.
Compression level: The file compression level at backup creation.
You can enter a value from 0 to 9, where 0 disables file compression, and 9 enables the highest file compression level.
Compression algorithm: The algorithm used for compressing files.
Possible values:
zlib
lz4
zstd
pglz
This parameter is available only if you enter a value greater than 0 in Compression level.
Pinning: Backup pinning parameters.
Possible values:
Do not pin: Do not pin the backup.
If you select this value, parameters specified in Storage parameters are used.
ttl: After the backup is created, it cannot be deleted from a storage during the specified number of days.
For this value, in Retention period, days, enter the number of days.
expire-time: The backup cannot be deleted from a storage until the specified date and time.
For this value, in Retention period until, specify the date and time.
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.
Remove expired WAL: Delete WAL of 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 Execute backup.
58.4.2. Viewing Backups #
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
The table of backups with the following columns will be displayed:
ID: The ID of the backup in pg_probackup.
This column includes additional information:
Size.
Mode: The backup creation mode.
Possible values:
FULL
DELTA
PAGE
PTRACK
For more information about backup modes, refer to the official Postgres Pro documentation on pg_probackup.
Storage: The storage where the backup is located.
You can use a local or S3 storage. The local storage must be located on the same server as the instance for which the backup is created.
Instance: The instance for which the backup is created.
Status.
Possible values:
REQUESTED: Backup creation was requested.
SCHEDULED: The backup creation was scheduled.
RUNNING: The backup is being created.
A progress bar is displayed below this status. Use it to monitor the progress of the backup creation.
DONE: The backup was created successfully.
DELETING_CANCEL: Backup deletion was canceled.
DELETING: The backup is being deleted.
VALIDATING: The backup consistency check is being performed.
VALIDATED: The consistency check demonstrated that the backup was not damaged during storage.
MERGING: An expired backup is being merged with a new one.
MERGED: An expired backup was successfully merged with a new one.
ERROR: An error occurred during backup.
This status is also displayed if the consistency check showed that the backup was damaged during storage.
Started at and Finished at: The start and end date of backup creation.
User: The user that created the backup.
Validation status: The status of the backup consistency check.
Possible values:
Validated: The consistency check of the backup was performed successfully.
Validating: The backup consistency check is being performed.
Start of validation and End of validation: The start and end date and time of the backup consistency check.
Actions.
For more information about available actions, refer to the corresponding instructions.
58.4.3. Checking the Consistency of a Backup #
The consistency check ensures that a backup was not damaged during storage.
To check the consistency of a backup:
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
Click
next to the backup.
You can view the result of the consistency check in the Status column of the table of backups:
If the backup is damaged during storage, the
ERRORvalue is displayed.If the backup is not damaged during storage, the
VALIDATEDvalue is displayed.
58.4.4. Viewing the Log of a Backup #
The backup log provides information about the backup creation progress.
To view the log of a backup:
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
Click
next to the backup.
58.4.5. Editing Pinning Parameters of a Backup #
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
Click
→ Edit pinning next to the backup.
Select one of the following values:
Do not pin: Apply backup storage parameters.
ttl: After the backup storage parameters are edited, the backup cannot be deleted during the specified number of days.
For this value, in Retention period, days, enter the number of days.
expire-time: The backup cannot be deleted until the specified date and time.
For this value, in Retention period until, specify the date and time.
Click Save.
58.4.6. Creating an Instance from a Backup #
Before performing this instruction, create a backup.
To create an instance from a backup:
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
Click
→ Restore next to the backup.
Specify parameters of the new instance (parameters marked with an asterisk are required):
Instance name.
Server: The server where the instance is installed.
Data directory: The path to the server directory where the main instance directories and files are located.
Binary directory: The path to the server directory where executable files of the instance are located.
System user: The operating system user that owns instance files and catalogs and on behalf of which the instance service runs. In most cases, it is the
postgresuser.Ensure that the specified user exists in the operating system.
External directories: If the backup includes directories located outside of the instance data directory, this parameter allows specifying the corresponding directories for the instance that is created.
Connection method: The method that clients use for connecting to the instance.
Possible values:
Network address.
For this value, in Network address, select the network address that the instance uses for receiving client connections.
Unix socket.
For this value, in Unix socket directory, enter the path to the Unix socket directory that the instance uses for receiving client connections.
Port: The port number that the instance uses for receiving client connections.
Backup: The backup from which the instance is created.
Backup size: The size of the backup from which the instance is created.
Restore point: The state to which the instance must be restored.
Possible values:
---: Restore the instance to the last state covered by the backup.
Date and time: Restore the instance state to the specified date and time covered by the backup.
For this value, in Date and time, specify the date and time.
LSN: Restore the instance to the state corresponding to the specified WAL LSN.
For this value, in LSN, enter the WAL LSN.
Transaction ID: Restore the instance state to the specified transaction ID.
For this value, in Transaction ID, enter the transaction ID.
For Date and time, LSN, and Transaction ID, specify the following parameter:
Restore the state at the specified date and time inclusive / Restore the state corresponding to the specified LSN inclusive / Restore the state corresponding to the specified transaction inclusive: Specifies whether the instance state is restored, including the specified value.
For example, if you enter
123456in Transaction ID and enable Restore the state corresponding to the specified transaction inclusive, the instance state is restored to the transaction with ID123456. If you do not enable Restore the state corresponding to the specified transaction inclusive, the instance state is restored to the transaction with ID123455.Database recovery: Specifies instance databases that are restored or excluded from the restoration process.
Possible values:
Restore all databases.
Exclude specified databases.
Restore specified databases.
For Exclude specified databases and Restore specified databases, in Exclude databases or Restore databases, enter the unique database name, and then click Add.
You can add multiple databases.
Available space: Allows checking whether there is enough disk space on the server for creating the instance from the backup.
To start the check, click Check.
Click Add instance.
58.4.7. Deleting a Backup #
Important
Deleted backups cannot be restored.
To delete a backup:
Go to backups in one of the following ways:
Using the backup section:
In the navigation panel, go to Backup.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Backup.
Click
→ Delete next to the backup.
Click Delete.