Backup, restore and credential rotation
Keep source and templates in Git. Store private environment files in an access-controlled backup system outside both repositories. Treat public metric history as reconstructible unless a specific backup policy is agreed.
For a simple consistent history backup, stop only the Raspberry Compose project, copy the unchanging dedicated filesystem image to protected storage, then restart and verify fresh reports. A copy of a mounted, changing ext4 image is not a guaranteed consistent backup. Account for backup size separately from the 8 GiB live budget.
Restore with this project’s services stopped and the dedicated filesystem unmounted. Replace the image from a verified backup, remount it, validate its capacity and start the project. Confirm ingestion and API history. Roll back application code without deleting telemetry.
Rotate the dedicated ingestion token on both gateway and Pi in one maintenance window. Restart both, observe transient retries and confirm freshness recovery. Rotate Grafana write credentials independently using least privilege. Never change unrelated stack credentials. Verify SSH key login in a second session before password rotation or disabling password authentication.
Keep release commits, rollback references and a record of successful recovery checks. Do not put credentials or private infrastructure identities into public release notes.