Repository navigation
fix(ops): 백업 예약을 "정각 1회" 에서 "자주 묻고 될 때" 로 — 잠자기 중 실행 5연속 실패 - #218
Merged
Merged
Conversation
월 09:30 정각 예약(StartCalendarInterval)은 맥이 덮개 닫힌 채 잠든 시각에 걸리면 다음 DarkWake(2~5초)에 작업을 띄운다. 10-12~11-09 예약 실행 5회가 전부 실패했다: DNS 실패 4회(네트워크 없음), 11-09 는 Wi-Fi 깨어남에 덤프가 시작됐다가 5초 뒤 재잠자기로 facilities COPY 도중 끊김(pmset -g log 로 시각 일치 확인). - scripts/backup_scheduled.sh 신설: launchd 가 30분마다 부르고, 마지막 성공 6일 경과 · 재시도 간격 3시간 · 완전히 깨어 있음(pmset systemstate 에 Graphics) · DB 풀러 TCP 연결이 모두 맞을 때만 backup.sh 실행. 조건 미달은 핑 없이 종료(미실행은 grace 가 알림). - backup.sh: 실행 중 caffeinate -i, 검증 전 실패 산출물 삭제(70바이트 빈 .gpg 4개와 1.7MB 반쪽 .gpg 가 완성본 이름으로 남았었다), 성공 표식 backups/.last_success. - backup.env.example · docs/supabase-db.md 동기화. 검증: 실패 경로(산출물 삭제·exit 1 유지), 예약 판정 6가지(가짜 backup.sh), 실 DB 성공 경로(임시 폴더, 표식 생성·caffeinate 종료 확인). 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.
무엇이 문제였나
월 09:30 정각 예약은 맥이 잠든 시각에 걸리면 다음 DarkWake(2~5초짜리 유지보수 깨어남)에 작업을 띄운다. 10-12 ~ 11-09 예약 실행 5회 전부 실패:
facilitiesCOPY 도중 끊김, 11:45 깨어나 실패 확정.gpg(4개)·1.7MB 반쪽.gpg(1개)가 완성본 이름으로 남았다바꾼 것
scripts/backup_scheduled.sh신설 (launchd 진입점, 30분 간격). 아래가 모두 맞을 때만backup.sh실행:backups/.last_success) 6일 경과 — 하트비트 주기 7일 안에 성공 핑이 들어오게pmset -g systemstate에Graphics(DarkWake 엔 없음)nc -z -G 5)조건 미달은 실패가 아니므로 핑 없이 종료. 오래 못 돌면 healthchecks grace 가 "미실행" 으로 알린다.
backup.sh: 실행 중caffeinate -i, 검증 전 실패 산출물 삭제(검증 후 단계 실패는 산출물 보존), 사본까지 끝나면 성공 표식 갱신(수동 실행도 갱신).backup.env.example(BACKUP_EVERY_DAYS·BACKUP_RETRY_HOURS) ·docs/supabase-db.md동기화.검증
.last_success생성, 실행 중 caffeinate 확인·종료 후 정리머지 후 (운영자 기기)
로컬 pmdb main 갱신 →
~/Library/LaunchAgents/kr.pawmate.backup.plist를backup_scheduled.sh·StartInterval 1800·RunAtLoad로 교체(스크립트 머리말에 내용 있음) → bootout/bootstrap → kickstart 로 launchd 경로 검증.🤖 Generated with Claude Code