1.4 KiB
1.4 KiB
Satoru Agent Notes
Project Intent
Satoru is a restic-based backup control plane for Linux hosts over SSH.
Core model:
- Satoru pulls from edge hosts (no direct edge->B2 writes).
- Stages data locally.
- Runs restic locally for deduplicated snapshots.
- Syncs restic data to B2 (scheduled).
Current Direction
- Background job execution for site operations.
- Preflight-first workflow before full backup runs.
- Strong operational visibility through structured logs and job events.
Run The Server
cd /Users/peterli/git/satoru
go run ./cmd/satoru
Default URL:
http://localhost:8080
Logging
Satoru uses structured logging and supports:
LOG_FORMAT=console|json(defaultjson)LOG_LEVEL=debug|info|warn|error(defaultinfo)LOG_FILE=/path/to/file.log(optional; logs still go to stdout)
Examples:
LOG_FORMAT=console LOG_LEVEL=debug go run ./cmd/satoru
LOG_FORMAT=json LOG_LEVEL=debug LOG_FILE=./logs/satoru.log go run ./cmd/satoru
tail -f ./logs/satoru.log | jq
Debug Logging Expectation
Be proactive with debug-level logging for:
- DB state changes (job/site/session mutations).
- Job lifecycle transitions and step boundaries.
- Scan and backup target-level decisions/results.
- External command start/finish, duration, and failures.
Logs should include useful identifiers where possible:
job_id,site_id,job_type,target_path,target_mode,status,error.