Repository navigation
feat(recovery): PV の戻しを pv.sh restore-all の 1 コマンドにする - #467
Conversation
…V の戻しを 1 コマンドにする スナップショットの経路の形(/data/<pvc>・/<ns>-<app>.db・/<ns>-postgres.sql・netbird / matrix の tar)で 操作を決め、namespace ごとに「止める → 戻す → 起こす」を通しでやる。restore-all は Forgejo を先に戻し、 ApplicationSet のエラーが消えるのを待ってから残りを回す(README の 8 そのもの)。表に無い経路は plan で止める。 plan-all は本番の restic と突き合わせ、全 namespace の判定が README の表どおりになるのを確かめた。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NN4TmSXHrMP8dkTbtkjfz1
|
Claude finished @5ym's task in 46s —— View job レビュー結果(
|
… が通ってから上書き - plan は namespace や PVC が無ければ飛ばさずに止める(未作成とやめたアプリの残りを区別できない) - restore-all は Forgejo の後、残り全部の plan が通るまで Argo CD を動かしたまま待ち(10 分)、 通らなければどこも上書きせずに止める。plan-all は 1 つでも決められなければ 1 で終わる - restore のループは fd 3 で読む(中で呼ぶコマンドが残りの行を食わない)。plan の一時ファイルは trap で消す Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NN4TmSXHrMP8dkTbtkjfz1
|
Claude finished @5ym's task in 41s —— View job レビュー結果(
|
…o の前に止める Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NN4TmSXHrMP8dkTbtkjfz1
|
Claude finished @5ym's task in 43s —— View job レビュー結果(
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NN4TmSXHrMP8dkTbtkjfz1
|
Claude finished @5ym's task in 32s —— View job レビュー結果(
|
変更
recovery/pv.shにplan/restore(namespace 単位)とplan-all/restore-all(全部)を足した/data/<pvc>→ folder、/<ns>-<app>.db→ sqlite、/<ns>-postgres.sql→ pgload、netbird / matrix の tar)deploy/postgresを残し、ユーザーと DB は plan の時点で deploy/postgres の env から決めるrestore-allは argo-pause → Forgejo → argo-resume して ApplicationSet のエラーが消えるのを待つ → argo-pause → 残り → argo-resumeplanの時点で止まる(黙って飛ばさない)。restore-allは戻し方の無い経路を Forgejo の前に、未作成の namespace / PVC は Forgejo の後に全部の plan が通るまで待って(10 分)、どこも上書きする前に止まるrecovery/README.mdの 8 をplan-all→restore-allの 2 行にし、経路と操作の表を新しい判定に合わせた建て直しの PV の戻しが、namespace ごとに 4〜6 コマンド × 14(約 60〜80)から 2 コマンドになる。
確認
pv.sh - plan-allを本番の restic とクラスタに対して流した(読むだけ)。forgejo と 13 の namespace の判定が README の表どおり(denpa は folder → sqlite の順、blog はyosegaki-db、netbird / matrix の tar も)restore自体は本番では流していない(上書きになるので)。次の建て直しで最初に確かめる、と README に書いてある🤖 Generated with Claude Code
https://claude.ai/code/session_01NN4TmSXHrMP8dkTbtkjfz1