How to disable BACKUP_NUM_TO_RETAIN while keeping scheduled base backups?

オープン
#2,990 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, kubernetes, postgresql

調査の方向性

まず、issue にリンクされている WAL アーカイブと物理 basebackup のドキュメントから始め、次に operator と Spilo の設定における BACKUP_NUM_TO_RETAIN とスケジュールされた basebackup の仕組みを追跡します。スケジュールされた basebackup を有効にしたまま、保持を S3 ライフサイクルルールに委任するサポート対象の方法を文書化または特定できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi!

We are currently using the scheduled basebackup mechanism with BACKUP_NUM_TO_RETAIN as described here: https://postgres-operator.readthedocs.io/en/latest/administrator/#wal-archiving-and-physical-basebackups.

We are running into some issues with the built-in backup cleanup logic and are evaluating an alternative approach. Based on the comment below, we are considering delegating retention entirely to S3 lifecycle rules:

Number of backups is set by BACKUP_NUM_TO_RETAIN. Spilo sets it to 5 by default, no? You can override it in the manifest in the env section of a cluster. You can also define lifecycle rules on S3 buckets. This is how we clean up old Postgres log files for example.

— @FxKu in #2942

Setting BACKUP_NUM_TO_RETAIN to a very large number works as a workaround, but it isn't ideal.

Setting a very large BACKUP_NUM_TO_RETAIN value technically works but feels like a workaround. Is there a proper way to completely disable Spilo's cleanup logic while still keeping the scheduled basebackup feature enabled?

Thanks!

主要言語
Go
スター
5.3k
フォーク
1.1k
平均マージ
3日 17時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zalando/postgres-operator のほかの issue

zalando/postgres-operator の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。