Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions apps/k8up/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@ CRD を Application が入れる種類のリソースは全部同じ([../../boot
## やめたアプリの残り

notify は過去 8 日に出てきた (host, path) を「あるべきもの」とみなすので、消したアプリや改名したアプリは 8 日のあいだ毎日鳴る。
**残さずに `restic forget --prune <ID…>` で消す。** Schedule が無くなったホストは forget も prune もされないので、消すまで R2 に残る。

- **消してよいもの**: `restic forget <ID…>`(`--host` だけでは何も消さない)。中身は日曜の prune で解放される
- **残しておきたいもの**: `restic tag --host <旧名> --add retired`。notify も restore-check も `retired` を見ない。
中身はそのままで restore できる
- **ID で指定する。** `--host` だけでは何も消さない。`--keep-tag` などの保持ポリシーで全部を外そうとすると、
restic は `refusing to delete last snapshot of snapshot group` で止まる
- 打つときは k8up のイメージ(`ghcr.io/k8up-io/k8up`、restic 入り)と `k8up-global` の秘密で使い捨ての Job を
`kubectl -n k8up create -f -` で流す(env の渡し方は [denpa-encoded-forget.yaml](denpa-encoded-forget.yaml) と同じ)
- forget はリポジトリを排他でロックするので、schedules.yaml の時刻を外す

打つときは k8up のイメージ(`ghcr.io/k8up-io/k8up`、restic 入り)と `k8up-global` の秘密で使い捨ての Job を
`kubectl -n k8up create -f -` で流す(env の渡し方は [denpa-encoded-forget.yaml](denpa-encoded-forget.yaml) と同じ)。
forget と tag はリポジトリを排他でロックするので、schedules.yaml の時刻を外す。

shadai(todoroku の旧名)・mattermost・erpnext・zulip は `retired`。Schedule が無いので forget も prune もされず、**消すまで R2 に残る**。
2026-10-18 までは残しておきたいものに `retired` のタグを付け、notify と restore-check で外していた。そのとき残っていた
shadai(todoroku の旧名)・zulip と、Talos に移す前の lgtm・xool・todoroku の 66 本は 2026-10-18 に消した
(重複排除でほとんど共有されていて、空いたのは 42 MiB)。
3 changes: 1 addition & 2 deletions apps/k8up/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ data:
const now = Date.now();
const hours = (t) => (now - Date.parse(t)) / 3600e3;

// (host, path) ごとに最新を拾う。`retired` の付いたもの(やめたアプリの残り。README「やめたアプリの残り」)は見ない。
// (host, path) ごとに最新を拾う。
const latest = new Map();
for (const s of snapshots) {
if ((s.tags ?? []).includes("retired")) continue;
for (const path of s.paths ?? []) {
const h = hours(s.time);
if (h > LEARN_H) continue;
Expand Down
3 changes: 1 addition & 2 deletions apps/k8up/restore-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# スナップショットは新しく、0 バイトでもない。それを捕まえるには実際に取り出して開くしかない。
# 四半期ごとの手動のリハーサル(ROADMAP)の代わり。建て直しそのものの手順は recovery/README.md。
#
# 見るもの((host, path) ごとの最新。`retired` は落とす。過去 8 日に出てこない経路は notify の担当):
# 見るもの((host, path) ごとの最新。過去 8 日に出てこない経路は notify の担当):
# - SQLite(.db): `PRAGMA integrity_check` が ok、表が 1 つ以上
# - pg_dump(.sql): 使い捨ての postgres に流して ERROR が 0 行、表の数を出す
# - tar: 全部展開できる。netbird は store.db / idp.db / events.db を SQLite と同じく見る。
Expand Down Expand Up @@ -261,7 +261,6 @@ data:
const now = Date.now();
const latest = new Map();
for (const s of JSON.parse(restic("snapshots", "--json").out)) {
if ((s.tags ?? []).includes("retired")) continue;
if ((now - Date.parse(s.time)) / 3600e3 > LEARN_H) continue;
for (const path of s.paths ?? []) {
const key = `${s.hostname}${path}`;
Expand Down
2 changes: 1 addition & 1 deletion apps/matrix/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# matrix

Matrix のサーバー一式(`m.doany.io`)。**Zulip からの移行先**(2026-10-06 に移して、Zulip は畳んだ)。
Zulip の最後のバックアップ(pg_dump と添付ファイル)は R2 に `final` / `retired` のタグで残っている。
Zulip の最後のバックアップ(pg_dump と添付ファイル)は 2026-10-18 に R2 から消した。

| 名前 | 何か | ここで動くか |
| --- | --- | --- |
Expand Down
Loading