Skip to content

feat(deploy): 백업 프리픽스 지원 + cron 등록 - #14

Merged
likell1 merged 1 commit into
mainfrom
feat/backup-prefix
Aug 11, 2026
Merged

likell1 merged 1 commit into
mainfrom
feat/backup-prefix

Conversation

@likell1

@likell1 likell1 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

R2 토큰이 버킷 단위라 전용 백업 버킷을 만들 수 없어, 미디어 버킷의 backups/ 프리픽스를 씁니다. 운영 서버에 매일 03:00 KST cron 을 걸었고 복구 리허설로 행수 일치를 확인했습니다.

R2 API 토큰이 jungwoon-private 버킷 단위로 발급돼 있어 전용 백업 버킷을
만들 수 없었다(ListBuckets/CreateBucket 모두 AccessDenied). 미디어 버킷을
그대로 쓰고 backups/ 프리픽스로 나눈다. 나중에 전용 버킷을 만들면
BACKUP_PREFIX 를 비우면 된다.

운영 서버에 걸어둔 것:
- 매일 03:00 KST cron (타임존이 UTC 로 되어 있어 Asia/Seoul 로 변경했다.
  안 고쳤으면 한국시간 정오에 돌 뻔했다)
- logrotate 주간 8회 보관

첫 백업 803KB 를 올렸고 복구 리허설도 마쳤다. 빈 DB 에 pg_restore 로
복원해 행수를 대조했다 — words 3998 · word_days 147 · word_day_items 6200 ·
listening_sentences 6795 · exams 24 로 운영과 일치한다.
@likell1
likell1 merged commit 374fbc7 into main Aug 11, 2026
@likell1
likell1 deleted the feat/backup-prefix branch August 11, 2026 18:03
likell1 added a commit that referenced this pull request Aug 20, 2026
feat(deploy): 백업 프리픽스 지원 + cron 등록
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant