[New Feature] Backup script — automated data backup for staging.db, config, and cover letters #9

Closed
opened 2026-03-04 09:32:57 -08:00 by pyr0ball · 1 comment
Owner

Overview

A scripts/backup.py is present locally but untracked. This issue tracks getting it cleaned up and committed.

Scope

  • Backup targets: data/staging.db, config/ (gitignored), generated cover letters, application logs
  • Destination: configurable via config/server.yaml (local path, or future: rclone remote)
  • Schedule: cron-compatible — can be called from cron, systemd timer, or manual ./manage.sh backup
  • Rotation: keep N most recent backups, auto-prune older ones
  • Restore: ./manage.sh restore <backup-file> unpacks and replaces data dir

Acceptance Criteria

  • ./manage.sh backup creates a timestamped tarball in configured backup dir
  • Backup excludes .env and any files containing credentials
  • Restore command validates tarball integrity before replacing data
  • Script committed and tested
## Overview A `scripts/backup.py` is present locally but untracked. This issue tracks getting it cleaned up and committed. ## Scope - Backup targets: `data/staging.db`, `config/` (gitignored), generated cover letters, application logs - Destination: configurable via `config/server.yaml` (local path, or future: rclone remote) - Schedule: cron-compatible — can be called from `cron`, `systemd timer`, or manual `./manage.sh backup` - Rotation: keep N most recent backups, auto-prune older ones - Restore: `./manage.sh restore <backup-file>` unpacks and replaces data dir ## Acceptance Criteria - `./manage.sh backup` creates a timestamped tarball in configured backup dir - Backup excludes `.env` and any files containing credentials - Restore command validates tarball integrity before replacing data - Script committed and tested
Author
Owner

Implemented and closed.

All acceptance criteria met:

  • scripts/backup.py committed and tested
  • ./manage.sh backup creates a timestamped tarball in the configured backup directory
  • .env and credential files excluded from backups
  • Restore command (./manage.sh restore <backup-file>) validates tarball integrity before replacing data dir
  • Rotation (keep N most recent) and auto-prune in place
  • Backup destination configurable via config/server.yaml
✅ **Implemented and closed.** All acceptance criteria met: - `scripts/backup.py` committed and tested - `./manage.sh backup` creates a timestamped tarball in the configured backup directory - `.env` and credential files excluded from backups - Restore command (`./manage.sh restore <backup-file>`) validates tarball integrity before replacing data dir - Rotation (keep N most recent) and auto-prune in place - Backup destination configurable via `config/server.yaml`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#9
No description provided.