I’m a long time user of restic and today I’m posting to share a restic-ecosystem WebUI I’ve been working on in recent months that I’m calling Backrest. I created Backrest because I wanted a backup tool with the fantastic capabilities of restic (fast, cross platform, reliable, well supported by a large community!!) that have lead me to use it on all of my systems but also with an easy to use remote-accessible WebUI across all of my platforms.
Backrest aims to take away the burden of setting up and managing restic backups by providing a simple to use featurefull web UI that supports both scheduling backup operations as well as browsing and restoring from existing backups. Backrest is shipped as a self-contained and light weight (<20 MB on all platforms) binary with no installation dependencies. It is my hope that Backrest fills a hole in the restic ecosystem in that it is suitable for both backups of headless systems (e.g. a web accessible UI for your NAS) and interactive devices (e.g. on a personal laptop). Backrest additionally tackles all problems associated with restic automation e.g. it is both a browser and a backup scheduler. I’m using Backrest myself to backup a NAS running Linux, a Mac laptop, a Windows laptop, and a Linux development machine.
Philosophically Backrest is a fairly thin wrapper around restic. It aims to create snapshots that are easy to view in the UI but that can also be easily manipulated out-of-band with the restic cli (without breaking anything!). Each operation Backrest performs on your behalf will be presented in the UI with visible status information and error messages.
Backrest’s WebUI features:
Creating restic repositories
Creating backup schedules (backrest orchestrates the backup operations, no need to setup your own cron jobs, systemd timers, or launchd agents)
Browsing backup operation history
Browsing snapshot contents and restoring files from the UI (e.g. no need to fiddle with the cli in a high-stress moment when you’ve lost data!).
Darkmode & Lightmode UI matching system settings.
Restic repositories are a native concept in backrest and any repo type supported by restic is supported by backrest (local, SFTP, S3, B2, etc).
Backrest adds a concept of a plan which is a list of directories to backup along with a schedule (expressed as a simple cronexpr), rentention policy (per restic forget), and any exclusion rules or other optional flags for the operation. This is how you configure what to backup and when.
Multiple plans can optionally share a repository such that you can have differential backup schedules for different directories on your machine. This is implemented simply using restic tags and is easily understood when browsing the repo with the restic CLI (should you feel the need to do so! Backrest can be used for most common browsing).
Scheduled health operations: prune and forget are run automatically with configurable frequency and retention. By default a prune operation is run every 7 days. Forget runs after every backup.
Downloading and installation: check out more details at https://github.com/garethgeorge/backrest. Releases are provided with GitHub actions (check the releases page) and install scripts for systemd / launchd services are bundled in each release for Linux and MacOS. An example with docker-compose config is also provided.
Wrapping up! I’m hoping that Backrest will be useful to others in the restic community as well and appreciate any feedback from the community! I’ll be using this to backup my systems and for my family, I aim to be active with issues + feature work and in getting out new versions with future restic releases.
Screenshot showing operation history tree & snapshot browser for a recent backup on my Linux host
Very cool! Looking forward to seeing how this evolves.
How do you do scheduling? Does it require that the application itself is always running, or does it somehow use the system’s scheduling features? If the former, is there some support for making the application run automatically on boot, or does one have to log in the user account and have the application in the autostart of the account?
Appreciate your interest! Scheduling is done with Backrest always running in the background. Backrest has an in-process task queue backups based on schedules, cronexpr is just used as a syntax for denoting schedules in the backrest config. Backrest idling in the background is a big element of why I’ve also taken pains to keep the binary small & to avoid any big in memory datastructures. Backrest should be very lightweight between backups.
For launching on startup I actually have some short guides on the README page for setting up systemd timers (or a launchd agent in the case of MacOS) to have backrest launch on startup. There’s also an install.sh script in the release that will copy backrest into /usr/local/bin and setup a startup task for it.
I finally had some time to try this project out and I have to say it is impressive. Deployment and configuration was very simple, it all just worked with minimal fuss (I went with a docker-powered containerised setup for testing). I have to echo what arkadi said as well about the ease of viewing and restoring individual files/folders; that is a very useful feature.
I did have a question about how you schedule restic prune though, if you’ll indulge my curiosity. I noticed that a forget task seems to be scheduled every time a backup is run, but only if the retention policy dictates it is necessary. Prune doesn’t seem to work quite the same though, in testing so far I only saw it run once, after the first “forget” task. Is there a limit per time period that prune can be triggered in or something similar?
Restic dependency updated to v0.16.3 (latest release).
Prune policy configurable in the repo UI (e.g. control the frequency of prune operations).
GPG key verification for restic installer: when Backrest is managing your restic installation it will now verify the download against a known GPG key for restic releases using the same approach as restic self-update
This is a pretty interesting point. At a minimum I’ll look at updating Backrest to require 600 permissions for the config file (e.g. readable / writable only for the current user).
In general, if an adversary has access to your filesystem and can read everything you’re typically in trouble. Best defense against ransomware is going to be using an append only repo and disabling forget / prune. I’ll make sure to add an option for this (right now backrest is perhaps too opinionated in that it always expects to run these health operations).
WRT a secret manager, I wonder if supporting encrypted config would accomplish this w/a config decryption key passed by environment variable? Perhaps you can open an issue on the GitHub repo to discuss a bit more of the UX!
First thanks for your work. the description of the what this program can do excites me. i am mainly windows user but also have UNRAID, Proxmox, play some dockers and Linux VM & LXC.
now, i have problem trying to install in windows.
i added backrest folder to windows environment variable path and run backrest in cmd but cant launch it.
do i need to manually download or set the restic.exe folder? because for windows, it will not be at the folder it try to find. it is always at more convenient folder of “c:\restic”
same error even if i put backrest in the adviced location
i manually copied restic.ext and renamed it to specific name (0.16.3) as shown in cmd that backrest if finding, then it works. i guess this make things very difficult for any user to install, especially whenever new restic version come out.
just look for restic.exe in few default folder including C:/restic or even C:/rclone
Oops – sorry you ran into this! Windows support is definitely experimental so support will be a bit more sporadic (and may break occasionally) but I am using it on one of my devices for the sake of beta testing my own code and whatnot to try to improve that overtime / generally get a stable release out.
With respect to your issue – it definitely looks like I broke the Windows installer in the latest release, I suspect it’s a simple fix. I’ll aim to get some test coverage setup for Windows. In the meantime, I think manually installing restic to that path as you’ve done is a good workaround. I’ve created Fix windows installer · Issue #58 · garethgeorge/backrest · GitHub to track this.
no problem. small issue to fix. manage to figure out an obvious fix. do keep up the good work though.
sounds like windows is not the main focus for backrest. usability in windows wise, i guess it will only improve over time when you add more discription. for “Add plan”, it will be great to able to read from a file for inclusion list and exclusion list like the normal restic can do. not sure whether this “add path” able to work for a file.
in windows wise, i am not sure whether backrest will run in background of scheduled backup. This is because in windows, i need to launch backrest through cmd to access the web-ui, as soon as the cmd is closed, web-ui is no longer accessible. this make me thing whether is there even any schedule that will work in the background
I must say this looks really nice, very promising!
I tried installing on my NAS via docker, but I cannot connect to the repo, as there does not seem to be an rclone binary in the container. Would it be possible to add this please?
Also, there does not seem to be any shell included, so going into the container via docker exec /bin/sh for doing stuff under the hood, for example configure and test rclone connection once it exists, is not doable, would you consider adding this to your container?
Thanks a lot!