A security-first USB backup agent built on Rust + Tauri, with restic as the backup engine.
Up to now the dashboard just said “Drive / Last backup / Protection” and gave you nothing while a backup was actually happening. Added a real progress bar and log stream — parse restic’s --json status output and push a state + log update every 5%, instead of the UI just sitting there looking frozen. Also fixed the copy contradicting itself (“Backup in progress” next to “ready to back up” at the same time, which is exactly as confusing as it sounds), and added a “backup may be stuck” hint after 30 minutes idle.
Bigger one: parallel backups. Multiple drives can each run their own backup now — running_drive_ids + a per-drive progress map — but I had a race where two backups could grab the same drive slot if they started close together, fixed by reserving the drive before spawning the actual restic process instead of after.
Also hardened what happens if you yank the drive mid-backup: each backup/restore gets a cancellation token now, and pulling the drive kills the restic subprocess and cleans up state instead of leaving it in some half-finished limbo. Added Linux desktop notifications (started/finished/failed/interrupted, plus “trusted device connected”) and a systemd user service so the agent can just run as a background service instead of needing to be launched manually.
Same day as the dashboard work, different mood: 16 unit tests for the boring-but-load-bearing stuff (label sanitizing, repository path resolution, restic’s retention-flag construction, JSON parsing, marker-path logic), a GitHub Actions workflow (fmt, clippy, test, release build for the agent; Tauri deps + release build for the UI), and .gitignored the bundled restic binary so it stops nearly getting committed. Should’ve done this on day one, did it on the day I finally got annoyed enough.
The idea: plug in a specific USB drive, it auto-backs-up whatever you’ve configured, using restic underneath (encrypted, deduplicated, content-addressed) instead of rolling my own backup format. Rust agent + a Tauri UI, IPC between them.
First commit already has the real shape: device detection/trust (devices.rs, usb.rs), a restic wrapper (restic.rs), retention policy handling, recovery, and a keychain module for not writing passphrases to disk. “Security-first” isn’t just a tagline here — restic actually does the encryption, I’m just the thing that decides when to run it and on which drive.