Backrest

Backrest is a web frontend to Restic which is my choice of backup tools for my home server. Check this page for mor einfo in Restic and how to use it for backups.

While Restic can be used from the command line and can use cron to schedule backups, navigating, checking and retrieving data might not be as intuitive from the command line.

Backrest comes to help and provides a nice web GUI to do all that, plus can be used instead of cron to performo periodical backups.

Backrest since 0.16 has been updated to support sub-paths, but still has some authentication issues. You need to disable backrest authentication (asked at first login) and use Proxy-authentication, but that will work only on sub-paths. On sub-domain, you still need to disable proxy auth and use backrest authentication.

Overall the UI is nice and efficient, and Backrest can be a good addition to your management web tools.

Installation

The official documentation (here) suggest to use their proivided install script, but it requires SystemD and overall put it's hands deep into root-only parts of the system, which i don't like.

fortunately, installing is really easy all you need to do is download the release, unzip, setup autostart and run it, that's it.

You want/need to run this as root to make sure it can actually access all the data it needs to backup. This could be mitigated by running as non-root, but in this case you carefully check that all the files are properly backed-up, and most probably direct restore will not work.

Binary releases can be found on this page, identify the one good for your architecture (ex: x86_64).

Since Backrest should work even when the RAID array is not mounted, you should place it under /opt/backrest instead of under /data/daemons/backrest:

mkdir /opt/backrest
cd /opt/backrest
wget https://github.com/garethgeorge/backrest/releases/download/<VERSION>/backrest_Linux_x86_64.tar.gz
tar zvf backrest_Linux_x86_64.tar.gz

Reverse Proxy

It's really simple to run Backrest behing NGINX:

backrest.conf
        location /backrest/ {
                proxy_pass http://127.0.0.1:9898/;
                proxy_set_header Connection $http_connection;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Host $host;
                proxy_set_header Authorization "";
        }

Startup and running

Check my Custom User Services page and do the following symlinks:

cd /etc/local.d
ln -s _servicer.sh 10-backrest-root-service.start
ln -s _servicer.sh 10-backrest-root-service.stop

And the associated service support file /opt/backrest/service_backrest_start:

service_backrest_start
COMMAND="/opt/backrest/backrest"
ARGUMENTS=(-bind-address 127.0.0.1:9898 -restic-cmd /usr/bin/restic -config-file /opt/backrest/config.json -data-dir /opt/backrest/)

And symlink to root home folder:

ln -s /opt/backrest/service_backrest_start /root/service_backrest_start

since it will be looked for in there.

(you need backrest to run as root to ensure all files can be backupped)