2023-11-28 19:57:50 -08:00
2023-11-28 17:03:46 -08:00
2023-11-28 19:57:50 -08:00
2023-11-28 17:03:46 -08:00
2023-11-16 19:49:25 -08:00
2023-11-28 17:03:46 -08:00
2023-11-28 17:03:46 -08:00
2023-11-16 20:21:25 -08:00
2023-11-28 17:03:46 -08:00

ResticUI

Build and Test

ResticUI is a WebUI wrapper for restic. It is intended to be used as a self-hosted application for managing backups of your data.

The goals of the project are:

  • Single binary deployment: the UI and backend are bundled into a single binary that can be deployed with no dependencies (other than restic!).
  • Light weight: the binary weighs in at ~25 MB as of writing and the goal is to keep it in this territory.
  • Easy to pull back the curtain: the UI is intended to be a wrapper around restic, but does not preclude using restic commands directly. It's easy to list snapshots directly using restic as a CLI to understand what's being stored.
  • Performant
    • Low background memory use
    • Snapy UI performant leveraging bbolt as a state store and cache.

Feature Support

  • Configure multiple restic repositories
  • Configure multiple backup plans for each repository
  • Execute scheduled backup operations e.g. on a cron schedule
  • Execute manually triggered backup operations
  • Browse backup operation history
  • Browse snapshot history
  • Browse files in a snapshot
  • Restore files from a snapshot (use restic UI to identify a snapshot to restore, use restic cli to restore it today)
  • Prune snapshots after backup operations (recommend periodically running restic prune on the CLI until this feature is supported)

Getting Started

Running

Installation options

  • Download a release from the releases page, extract and run the binary (you may need to mark it executable e.g. chmod +x resticui).
  • Build from source (see below).

ResticUI is accessible from a web browser. By default it binds to 0.0.0.0:9898 and can be accessed at http://localhost:9898.

Configuration

Environment Variables

  • RESTICUI_PORT - the port to bind to. Defaults to 9898.
  • RESTICUI_CONFIG_PATH - the path to the config file. Defaults to $HOME/.config/resticui/config.json or if $XDG_CONFIG_HOME is set, $XDG_CONFIG_HOME/resticui/config.json.
  • RESTICUI_DATA_DIR - the path to the data directory. Defaults to $HOME/.local/share/resticui or if $XDG_DATA_HOME is set, $XDG_DATA_HOME/resticui.
  • RESTICUI_RESTIC_BIN_PATH - the path to the restic binary. Defaults managed version of restic which will be downloaded and installed in the data directory.

Screenshots

Configuring a backup plan: Configure Backup Plan

Running backup operation: Backup Running

Browsing snapshots: Browse Backup

Developer Setup

Dev Depedencies

Build Dependencies

  • Node.JS for UI development
  • Go 1.21 or greater for server development
  • go.rice go install github.com/GeertJohan/go.rice@latest and go install github.com/GeertJohan/go.rice/rice@latest

To Edit Protobuffers

apt install -y protobuf-compiler
go install \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go install github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/bufbuild/buf/cmd/buf@v1.27.2

Building

(cd webui && npm i && npm run build)
(cd cmd/resticui && go build .)
Description
Backrest is a web UI and orchestrator for restic backup.
Readme GPL-3.0 41 MiB
Languages
Go 59.4%
TypeScript 37.4%
Inno Setup 1.7%
Shell 1.3%
Dockerfile 0.1%