[Backrest] Web UI and orchestrator for Restic backup

Backrest for YunoHost

Integration level Working status Maintenance status

Install Backrest with YunoHost

Read this README in other languages.

This package allows you to install Backrest quickly and simply on a YunoHost server.
If you don’t have YunoHost, please consult the guide to learn how to install it.

Overview

Backrest is a web-accessible backup solution built on top of restic. Backrest provides a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations.

Shipped version: 1.5.1~ynh2

Screenshots

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that:

sudo yunohost app install https://github.com/YunoHost-Apps/backrest_ynh/tree/testing --debug
or
sudo yunohost app upgrade backrest -u https://github.com/YunoHost-Apps/backrest_ynh/tree/testing --debug

Hi!

After installation, my postgresql failed to boot after new ACLs were granted to “/var/lib/postgresql/15/main” (at least that is what I have been able to gather).

This caused several other services to fail.

Permissions were restored with

sudo chmod 700 -R /var/lib/postgresql/15/main

after having tried to edit the ACLs with setfacl, which did not help.

Can you share the logs of postgresql?
May be should it be run as root and avoid the permissions setup

Hi. So this is the log I got: hastebin.

Granting permissions as described solved it, sort of. The Backrest user is still there in the ACLs after uninstalling backrest.

Thanks. I will have a look at it next week

Same problem here, will try your fix.

Added in testing. I also checked that backrest is still able to backup postgresql folder :

Don’t hesitate if you have any suggestions and feedback

I had all instances/clusters of postgresql failing to start.
Lots of services affected. I believe the solution was very easy in the end, just re-applying correct permissions to all instances in /var/lib/postgresql/.

I repeated for /var/lib/postgresql/15/main/, /var/lib/postgresql/16/main/ and /var/lib/postgresql/17/main/.

Good luck!

Looks like a simple solution :sweat_smile:

I attempted an update with:

yunohost app upgrade backrest -u https://github.com/YunoHost-Apps/backrest_ynh/tree/testing --debug --force

but there was no change.

However, running the following command manually fixed the issue:

chmod -R 700 /var/lib/postgresql

Thank you both

Just trying to create a backup of the /etc directory, and it seems some items can’t be backed up.

It looks like when files/folders aren’t owned by root, they can’t be backed up.

Is there a way to fix this? I’m a total newbie with Backrest and Restic; I previously used Duplicity with a custom bash script to manage my backups.

I didn’t add permissions for the app to access these folders.
I tried to avoid breaking the system but it was not enough.
I will rethink about changing the user running it.
I have tried running it as root without problem, but I was not confortable giving it root permission.
You can try to change the systemd service of backrest, change user and group to root, reload daemon and restart the app.

Well, not sure, but maybe something like the borg app with sudoers files could be used.

In the meantime, I’ll try your solution.

You can try this branch GitHub - YunoHost-Apps/backrest_ynh at root
It makes backrest run as root.
I will check your suggestion as soon as possible.

After searching for a bit, I just found out that Restic doesn’t support cold storage options for now. This is a dealbreaker for me due to cost reasons, as I use it solely for disaster recovery.

However, it seems that Rustic does, and:

It reads and writes the Restic repository format described in the design document and can be used as a Restic replacement in most cases.

For now, I’ll check out Rustic’s documentation and go with scripts and keep an eye on Backrest’s support for Rustic.

Thank you for letting me discover this tool @jarod5001

Thanks for the interest.
I have packaged backrest mainly because I needed s3 support.
I will certainly keep an eye on the “backrust” development.
The web interface gives a lot of information in one go.
I am grateful for your feedback.

New update released 1.6.2

Note to users with version 1.5.1~ynh3 or older :

Config file needs to be moved manually from /root/.config/backrest/config.json to /home/yunohost.app/backrest/config.json

I just want to give a public thank you to the folks who have made the Backrest app possible. I have Restic installed on my system and have been using it for a few years, trouble-free, but I found the CLI such a drag to use to achieve a simple thing. I love Restic, but with Backrest it’s just unleashed a new and very useful beast. Thank you very much, gang!!

For what it’s worth, here is my backup strategy: Backups and howto | The Library

Dj

Thanks for this tutorial.
Note that backrest ships its own version of restic that is available in the data_dir /home/yunohost.apps/backrest. I forgot to add it to the path of backrest shell. Will do it when I have time.
I wanted to mix yunohost backup with backrest to get a deduplicated backup but this needs some work.
What would be nice is to have a restore tutorial also.

@jarod5001 because Backrest does it all in the GUI I omitted a restore tutorial, but yes it’s important to include as the recovery is the trickiest part compared to the back up. I’ll put one together.

I did a tutorial on restic here for backing up and cron creation. I’ll add a section on restoring here.

Thanks again

Dj