How garethgeorge/backrest works
Backrest is a web-accessible restic backup manager. Users configure repositories and plans in the WebUI, submit backup or maintenance work, and inspect operation history, status, and snapshots; they can also browse and restore files. The backend exposes Connect APIs, persists configuration and operation history, and schedules repository tasks that invoke restic. The README also documents notifications, command hooks, remote-instance synchronization, and multiple storage backends. Connections for unsampled capabilities are included only where documented; source excerpts do not reveal every runtime wiring detail.
Main entry points: backresthandler.go Backup API · orchestrator.go Task orchestration · client.ts API client · syncclient.go Peer sync client
Components 21
Web interface
- Web application
webui/src/app/App.tsx - Backup UI
webui/src/features - Dashboard and activity
webui/src/features/dashboard/SummaryDashboard.tsx - API client
webui/src/api/client.ts - UI state and aggregation
webui/src/api/flowDisplayAggregator.ts - Client protocol types
webui/gen/ts
API and identity
- Backup API
internal/api/backresthandler.go - Authentication API
internal/api/authenticationhandler.go - Authentication
internal/auth/auth.go
Backup operations
- Task orchestration
internal/orchestrator/orchestrator.go - Repository tasks
internal/orchestrator/tasks - Restic execution
pkg/restic/restic.go - Restic installation
internal/resticinstaller/resticinstaller.go
Configuration and history
- Config storage
internal/config - Operation history
internal/oplog/oplog.go - Operation logs
internal/logstore/logstore.go
Remote synchronization
- Sync manager
internal/api/syncapi/syncmanager.go - Peer sync client
internal/api/syncapi/syncclient.go
Other components
- User
- Remote Backrest instance
- Restic repository
Connections 21
- User → Web application: uses
- Web application → Backup UI: shows
webui/src/app/App.tsx - Backup UI → API client: requests
- Dashboard and activity → UI state and aggregation: aggregates
- API client → Client protocol types: uses types
webui/src/api/client.ts - API client → Backup API: calls API
- Backup API → Config storage: reads/writes
internal/api/backresthandler.go - Backup API → Task orchestration: schedules tasks
internal/api/backresthandler.go - Backup API → Operation history: queries history
internal/api/backresthandler.go - Backup API → Operation logs: streams logs
internal/api/backresthandler.go - Authentication API → Authentication: authenticates
internal/api/authenticationhandler.go - Task orchestration → Repository tasks: runs tasks
internal/orchestrator/orchestrator.go - Repository tasks → Restic execution: invokes restic
- Restic execution → Restic repository: operates on
- Restic installation → Restic execution: provides binary
- Task orchestration → Operation history: records operations
internal/orchestrator/orchestrator.go - Task orchestration → Operation logs: writes logs
internal/orchestrator/orchestrator.go - Sync manager → Config storage: watches config
internal/api/syncapi/syncmanager.go - Sync manager → Peer sync client: starts peer sync
internal/api/syncapi/syncmanager.go - Peer sync client → Remote Backrest instance: syncs with
internal/api/syncapi/syncclient.go - Peer sync client → Operation history: transfers history
internal/api/syncapi/syncclient.go