Configuring retention times in cr.yaml

Description:

The documentation here:

only speaks of retention for full and differentials.

I have setup two repo’s with schedules as follows:

      repos:
      - name: repo1
        schedules:
          full: "0 1 1 * *"           # Monthly full backup on the 1st of each month
          differential: "0 0 * * 0"   # Weekly differential backup on Sundays
          incremental: "0 0 * * 1-6"  # Daily incremental backups from Monday to Saturday
        volume:
          ...
      - name: repo2
        schedules:
          full: "0 1 1 * *"           # Monthly full backup on the 1st of each month
          differential: "0 0 * * 0"   # Weekly differential backup on Sundays
          incremental: "0 0 * * 1-6"  # Daily incremental backups from Monday to Saturday
        s3:
         ...

I would like the repo1 to be fast, online backup with short retention times. The S3 is offsite, with loads of spinning rust storage. This should keep long retention.

The retention is setup as follows:

      global:
        repo1-retention-full: "1"
        repo1-retention-full-type: "count"
        repo1-retention-diff: "5"
        repo1-retention-diff-type: "count"
        repo1-retention-incr: "31"
        repo1-retention-incr-type: "count"
        repo2-retention-full: "12"
        repo2-retention-full-type: "count"
        repo2-retention-diff: "9"
        repo2-retention-diff-type: "count"
        repo2-retention-incr: "31"
        repo2-retention-incr-type: "count"
        repo1-path: /pgbackrest/repo1
        repo2-s3-uri-style: path

However the retention spec generated warnings. Initially because I used full names like repo1-retention-differential and repo1-retention-incremental.

I looked up the docs and looked at the full Operator CRD reference documentation and noticed that the backup retention documentation I linked only speaks of full and diff shortname retention key names but the CRD reference makes no mention of retention at all?

I assume the shortname for incremental is incr, but there is no way to verify whether that is actually correct.

Link:

Version:

2.4.1

Expected Result:

I expected the documentation to provide a more complete explanation of the possible retention options. In particular the CRD documentation seems incomplete.

Actual Result:

I hope to be able to setup retention count as illustrated in the global part of my config above.

Additional Information:

Is it possible to set retention for incrementals? I assume my config is correct this way, but there is no way to verify as the docs make no mention of incremental retention. For me this is trial and error right now and hoping my config is correct.

Thanks for your time!

ps. I just noticed the same is true for incremental schedules. The CRD reference speaks of full and differential, but no mention for incremental schedules. The cr.yaml does contain an example for incremental so it does exist :wink: .

Hi @Fragment2 As you can see from pgbackrest official documentation pgBackRest User Guide - Debian & Ubuntu
Incremental backups cannot be expired independently — they are always expired with their related full or differential backup.

P.S. I have created the task to improve our documentation [K8SPG-641] - Percona JIRA