Repository navigation
fix(ops): 주간 점검·백업의 조용한 실패 제거 — 상시 빨간불과 거짓 초록불 - #214
Merged
Merged
Conversation
주간 점검은 첫 예약 실행(08-10)부터 10주 연속 실패였고, 그 사이 주간 백업은
launchd 등록 후 5주 연속 실패(마지막 백업 08-31)했는데 어느 쪽도 그 사실을
말해 주지 못했다.
weekly_check.sh
- ⑤ 재인증: ⚠ 는 남은 0~7일만. 이미 만료된 계정은 ℹ 로 수만 센다(종전엔 재인증할
때까지 매주 "임박", 표기도 D--49 — 상시 실패의 주원인)
- ② 클라이언트 오류: 네트워크성 일시 오류는 합계 5건 이상일 때만 ⚠, 그 밖은 1건부터 ⚠
- 조회 실패를 ✅ 로 출력하던 것 수정 — 연결 사전 확인 + count() 로 항목별 ⚠
(종전: 빈 값이 [ "" -gt 0 ] 에서 거짓 → else 의 ✅. ⑫⑬은 ${n:-0})
- ⑭: 조회 실패를 "드리프트" 로 오보하던 것 분리
- ⑨: 폴더 최신 파일이 아니라 덤프 파일만 본다(backup.log 가 최신이라 실패 중에도 "0일 전")
backup.sh
- PATH 를 스크립트가 직접 잡는다(launchd PATH 에 Homebrew 없음 → gpg 없음)
- 오프사이트 사본 폐기를 이름 기준으로(launchd 에서 iCloud 폴더 목록 읽기는 TCC 가
막고 그 실패를 || true 가 삼켰다 — 사본이 보존주기를 넘겨 남음)
- BACKUP_HEARTBEAT_URL(선택): 성공 핑·실패 /fail 핑
weekly-check.yml: 예약을 정각에서 17분으로(실행이 1~4시간 밀렸다)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
10/5 주간 점검 실패를 검토하다 나온 것들이다.
backup.log를 최신 백업으로 착각해 어느 쪽도 알리지 못했다.변경
scripts/weekly_check.sh<= 7— 이미 만료된 계정도 재인증할 때까지 매주 ⚠ (D--49)[ "" -gt 0 ]에서 거짓 → ✅ 출력count()로 항목별 "조회 실패" ⚠backup.log가 잡혀 실패 중에도 "0일 전"db_*.dump*만 본다② 의 일시 오류 분류는
TRANSIENT_RE한 줄이다. 건수 임계치만 두지 않은 이유: 사용자가 적을 땐 실제 회귀도 1건으로 온다(09-06permission denied for function).scripts/backup.shfind: Operation not permitted). 경로를 아는 파일의 생성·삭제는 된다. 종전find … -delete || true가 실패를 삼켜 사본이 보존주기를 넘겨 남았다.BACKUP_HEARTBEAT_URL(선택): 성공 시 핑, 실패 시/fail핑. 미설정이면 로그에 경고만 남긴다..github/workflows/weekly-check.yml예약을
0 0→17 0으로. 정각 예약이 1~4시간씩 밀렸다(10/5 는 12:54 KST).검증
2206020 — D-6만 ⚠ + 만료 1개 ℹ, ⑨ 는 덤프 파일명으로 표시curl로 전체 API 실패 → "DB 조회 불가" 한 줄 + exit 1 / 일부 쿼리만 실패 → 해당 항목만 "조회 실패" ⚠client_errors전체에TRANSIENT_RE적용 → 504·자산 로드는 일시,permission denied는 실제 오류로 분류backup.sh: launchd 와 같은 최소 PATH(env -i)로 임시 폴더에 실제 덤프 → 성공 핑, 보존주기 초과 짝은 로컬·사본 모두 폐기, 보존 대상은 유지 / DB URL 없이 실행 → exit 1 +/fail핑ls·find는 거부,stat·touch·rm은 성공머지 후 할 일
backup.sh를 쓴다(plist 의 PATH 는 이미 고쳐 둬서 그 전에도 백업은 돈다).backup.env의BACKUP_HEARTBEAT_URL에 넣기.🤖 Generated with Claude Code