Skip to content

feat(backup): wire DLM policy into provision/status/destroy + add quarterly tier#6

Merged
brfid merged 1 commit intomainfrom
feat/backup-dlm-integration
Feb 22, 2026
Merged

feat(backup): wire DLM policy into provision/status/destroy + add quarterly tier#6
brfid merged 1 commit intomainfrom
feat/backup-dlm-integration

Conversation

@brfid
Copy link
Copy Markdown
Owner

@brfid brfid commented Feb 22, 2026

Summary

  • Auto-apply on provision: edc provision now calls backup-policy apply automatically after the instance is created. Failure is non-fatal (warns and continues).
  • Quarterly schedule: adds a 4th DLM schedule firing on 1st Jan/Apr/Jul/Oct — gives one snapshot at ~3 months old alongside daily/weekly/monthly.
  • Retention defaults changed from 7/4/2 to 1/1/1/1: exactly one snapshot per tier, matching the intent of "1 at a day ago, 1 at a week ago, 1 at a month ago, 1 at 3 months ago".
  • edc status now shows backup policy ID and state (ENABLED/DISABLED/absent).
  • edc destroy warns to stderr if no active DLM policy is found before proceeding.
  • DLM targets EBS volumes by tag and is independent of instance state — snapshots accumulate whether the instance is running or stopped.

Test plan

  • edc provision output includes "DLM backup policy active" line
  • edc status shows "Backups: DLM policy ..." line
  • edc destroy (with no policy) prints backup warning to stderr
  • edc backup-policy apply accepts --quarterly-keep option
  • All 56 existing unit tests pass (tests/test_backup_policy.py, tests/test_cli.py)

🤖 Generated with Claude Code

…rterly tier

- backup_policy.py: add quarterly schedule (1st of Jan/Apr/Jul/Oct at 06:00),
  change retention defaults from 7/4/2 to 1/1/1/1 (one snapshot per tier),
  rename schedule names from "daily-7" etc. to plain "daily"/"weekly"/"monthly"/"quarterly"
- cli.py: auto-apply DLM policy at end of `edc provision` (warn on failure);
  show backup policy state in `edc status`; warn before `edc destroy` if no
  active policy is found; add --quarterly-keep option to `backup-policy apply`
- tests: update defaults throughout; add test asserting quarterly schedule is
  included and that 4 schedules are created
- docs/ARCHITECTURE.md: document auto-apply behaviour, retention tiers, and
  instance-state independence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@brfid brfid merged commit bc3d7f8 into main Feb 22, 2026
1 check passed
@brfid brfid deleted the feat/backup-dlm-integration branch February 22, 2026 21:49
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