cloudnative-pg / cloudnative-pg/plugin-barman-cloud
base backup are not pruned (even though retention is set)
- 主要语言
- Go
- 星标
- 191
- 派生
- 72
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 18
描述
hey, i’ve encountered a problem - retention policy works for wals, but not for base backups. Base backups are not pruned at all. Im using hetzner s3 if it matters, wals retention works fine
```
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: main-db-object-store
namespace: main-db
spec:
retentionPolicy: "7d"
# needed for non-AWS S3-compatible object storages
instanceSidecarConfiguration:
env:
- name: AWS_REQUEST_CHECKSUM_CALCULATION
value: when_required
- name: AWS_RESPONSE_CHECKSUM_VALIDATION
value: when_required
- name: AWS_MAX_ATTEMPTS
value: "10"
configuration:
destinationPath: "...."
endpointURL: "https://hel1.your-objectstorage.com/"
s3Credentials:
accessKeyId:
name: hetzner-s3-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: hetzner-s3-creds
key: ACCESS_SECRET_KEY
wal:
compression: gzip
maxParallel: 4
archiveAdditionalCommandArgs:
- "--read-timeout=1200"
data:
compression: gzip
jobs: 1
additionalCommandArgs:
- "--read-timeout=3600"
- "--min-chunk-size=512MB"
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: main-db-daily-backup
namespace: main-db
spec:
schedule: "0 0 2 * * *"
backupOwnerReference: self
cluster:
name: main-db
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
```
贡献指南
调研方向
首先复现将 retentionPolicy 设置为 "7d" 的 ObjectStore 配置,以及使用 Barman Cloud 插件的 ScheduledBackup。比较 WAL 和基础备份的 pruning 行为,包括 Hetzner 的 S3 兼容端点;当早于配置的 retention 周期的基础备份被 pruning,且不影响 WAL retention 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, postgresql
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100