33.6. Creating a Backup #

For more information about backups, refer to Chapter 58.

To create a backup:

  1. In the navigation panel, go to InfrastructureInstances.

  2. Click Three vertical dots iconCreate backup next to the instance.

  3. 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.

    • 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.

  4. 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.

    • 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 3 in Full backups, pcs. and 7 in 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.

  5. Click Create.