Skip to content

Add standard backup labels/annotations to volume snapshots #2794

Closed

Description

@gbartolini

Once the volume snapshot through cold backup is taken, we should add some labels to the object to facilitate search via selectors, as well as some annotations containing the relevant information. This is just a basic initial idea.

Labels:

  • cnpg.io/backupTimeline
  • cnpg.io/backupYear: format YYYY
  • cnpg.io/backupMonth: format YYYMM
  • cnpg.io/onlineBackup: true/false - false in case of cold backup (meaning the backup is consistent)

Annotations:

  • cnpg.io/backupStartWAL
  • cnpg.io/backupEndWAL
  • cnpg.io/backupStartTime
  • cnpg.io/backupEndTime
  • cnpg.io/snapshotStartTime - taken before invoking the creation of the snapshot
  • cnpg.io/snapshotEndTime - taken when the volume snapshot becomes ready (approximation).

My suggestion is to do further analysis on pg_controldata and what we will expect from future support of backup labels returned by pg_start_backup() and pg_stop_backup(). More ideas can be taken from the backup info file in Barman.

Activity

  1. added this to the 1.21.0 milestone on Sep 15, 2023
  2. changed the title [-]Add standard backup labels to volume snapshots[/-] [+]Add standard backup labels/annotations to volume snapshots[/+] on Sep 15, 2023
  3. added
    do not backportThis PR must not be backported - it will be in the next minor release
    on Sep 26, 2023
  4. added a commit that references this issue on Sep 28, 2023
    c5abf68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    do not backportThis PR must not be backported - it will be in the next minor releaseenhancement 🪄New feature or request

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions