User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
services:backrest [2024/03/22 14:02] – created willyservices:backrest [2024/08/06 13:14] (current) willy
Line 7: Line 7:
 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 comes to help and provides a nice web GUI to do all that, plus can be used instead of cron to performo periodical backups.
  
-Unfortunately Backrest has a few nags at this time: +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 loginand 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.
-  * Don'support sub-paths (must be installed on it's own subdomain) +
-  * Cannot work with proxy authentication. On thisit's so broken that you **must** disable proxy auth for Backrest to work at all.+
  
-Both issues are annoying, but not blocking. Overall the UI is nice and efficient, and Backrest can be a good addition to your management web tools.+Overall the UI is nice and efficient, and Backrest can be a good addition to your management web tools.
  
 ===== Installation ===== ===== Installation =====
Line 35: Line 33:
 It's really simple to run Backrest behing NGINX: It's really simple to run Backrest behing NGINX:
 <file - backrest.conf> <file - backrest.conf>
-        location / {+        location /backrest/ {
                 proxy_pass http://127.0.0.1:9898/;                 proxy_pass http://127.0.0.1:9898/;
-                #proxy_pass http://127.0.0.1:2283/;+                proxy_set_header Connection $http_connection; 
 +                proxy_set_header Upgrade $http_upgrade; 
 +                proxy_set_header Host $host; 
 +                proxy_set_header Authorization "";
         }         }
 </file> </file>
  
-currently PAM auth cannot be used and Backest doesn't support sub-paths. 
  
 ===== Startup and running ===== ===== Startup and running =====
  
-Create the usual **/opt/backrest/backrest.sh** script: +Since i prefer OpenRC, let's create backrest init script: 
-<fine - backrest.sh+<file /etc/init.d/backrest> 
-#!/bin/bash +#!/sbin/openrc-run 
-/opt/backrest/backrest -bind-address 127.0.0.1:9898 -restic-cmd /usr/bin/restic -config-file /opt/backrest/config.json -data-dir /opt/backrest/ +# Copyright 1999-2021 Gentoo Authors 
-</file>+# Distributed under the terms of the GNU General Public License v2
  
-and autostart script **/etc/loca.d/21-backrest.start**: +description="restic WEB GUI interface" 
-<file - 21-backrest.start> +pidfile="/run/backrest.pid" 
-#!/bin/bash +command_background=true 
-start-stop-daemon --m -p /var/run/backrest/backrest.pid -n backrest /opt/backrest/backrest.sh+command="/opt/backrest/backrest" 
 +command_args="-bind-address 127.0.0.1:9898 -restic-cmd /usr/bin/restic -config-file /opt/backrest/config.json -data-dir /opt/backrest/
 + 
 +depend() { 
 +        need net 
 +}
 </file> </file>
  
-make both executable of course!+Now just make it executable and assign to a runlevel: 
 +<code bash> 
 +chmod +x /etc/init.d/backrest 
 +rc-update add backrest default 
 +</code> 
 + 
 +That's it! 
 + 
 +(you need backrest to run as root to ensure all files can be backupped) 
 + 
 +===== Upgrades ===== 
 + 
 +Just download latest release binary and unzip replacing the older one. 
 + 
 +Be advised when upgrading from pre 1.0 to above 1.0 releases, that you **must** run 1,0 once and set the instance_id.
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information