# Session 0008: Schedule Management & Backup Coverage System **Date:** 2026-02-23 **Status:** Completed **Origin:** MDF Webseiten session 0040 --- ## Work Done - [x] Fixed `backup-all.sh` — was appending env suffix twice → files landed in `.../dev/dev/` - [x] Moved stranded double-nested backup files to correct directories - [x] Version-controlled `offsite.py` and `backup-all.sh` into infrastructure repo - [x] Added `_backup_generic()` function to ops CLI — tar-based fallback for projects without a dedicated CLI - [x] Added `backup:` config blocks to `registry.yaml` for MDF (03:15), SeriousLetter (03:00), Coolify (04:00) - [x] Created `gen-timers.py` — reads registry, generates systemd `.service` + `.timer` units automatically - [x] Added `ops gen-timers [--dry-run]` command — replaces legacy backup-all, mdf-backup, seriousletter-backup timers - [x] Created `schedule.py` FastAPI router: - `GET /api/schedule/` — returns backup config for all projects - `PUT /api/schedule/{project}` — updates config, writes registry via nsenter, regenerates timers - [x] Added "Schedules" nav item to dashboard sidebar (clock icon) - [x] Schedule page: table showing all projects with enabled/schedule/envs/offsite/retention columns - [x] Schedule edit modal: toggle, time picker, env checkboxes, offsite section, retention fields ## Key Decisions / Learnings - registry.yaml drives both systemd timers and the dashboard schedule UI — single source of truth - `gen-timers` must auto-remove orphan timers (e.g. `backup-coolify.timer`) — prevents ghost schedules - `PUT /api/schedule/{project}` writes via nsenter (not inside container) because systemd lives on host - `backup-all.sh` must NOT append `/$env` suffix if the CLI already appends it internally --- **Tags:** #Session #OpsDashboard #Backups #Scheduling