Backrest: install Backrest as a systemd service to simplify pre/post-backup hooks (e.g., docker compose stop/start). Do not want to overcomplicate setup and run backrest (single binary) in a container with SSHing to host and/or docker.sock access

This commit is contained in:
v.karaychentsev
2026-02-20 11:34:29 +03:00
parent 7d7080b336
commit 2bf6cba869
4 changed files with 54 additions and 42 deletions

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Backrest
After=network.target docker.service
[Service]
Type=simple
User=backups
ExecStart=/usr/local/bin/backrest
WorkingDirectory=/home/backups/backrest
# wrap with caddy reverse proxy
Environment="BACKREST_PORT=172.17.0.1:9898"
[Install]
WantedBy=multi-user.target