User Tools

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:backrest [2024/04/02 14:23] willyservices:backrest [2024/08/06 13:14] (current) willy
Line 45: Line 45:
 ===== Startup and running ===== ===== Startup and running =====
  
-Check my [[gentoo:locald|Custom User Services]] page and do the following symlinks+Since i prefer OpenRC, let's create backrest init script
-<code bash> +<file - /etc/init.d/backrest> 
-cd /etc/local.d +#!/sbin/openrc-run 
-ln -s _servicer.sh 10-backrest-root-service.start +# Copyright 1999-2021 Gentoo Authors 
-ln -s _servicer.sh 10-backrest-root-service.stop +# Distributed under the terms of the GNU General Public License v2
-</code>+
  
-And the associated service support file **/opt/backrest/service_backrest_start**: +description="restic WEB GUI interface" 
-<file - service_backrest_start> +pidfile="/run/backrest.pid" 
-COMMAND="/opt/backrest/backrest" +command_background=true 
-ARGUMENTS=(-bind-address 127.0.0.1:9898 -restic-cmd /usr/bin/restic -config-file /opt/backrest/config.json -data-dir /opt/backrest/)+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>
  
-And symlink to root home folder:+Now just make it executable and assign to a runlevel:
 <code bash> <code bash>
-ln -s /opt/backrest/service_backrest_start /root/service_backrest_start+chmod +x /etc/init.d/backrest 
 +rc-update add backrest default
 </code> </code>
-since it will be looked for in there.+ 
 +That'it!
  
 (you need backrest to run as root to ensure all files can be backupped) (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