Like 0

Backrest web UI for restic backups via Docker Compose. Sources are mounted read-only, backups go to a separate volume. Tested on UGREEN DXP6800 Pro.

Sebo revised this gist 12 hours ago · 344c968

1 file changed, 62 insertions

docker-compose.yml (file created)
@@ -0,0 +1,62 @@
1 + # Backrest – Web UI for restic backups
2 + # Tested on: UGREEN DXP6800 Pro (UGOS), Docker Compose
3 + #
4 + # What it does:
5 + # Backrest runs scheduled restic backups of your Docker data.
6 + # All sources are mounted read-only (:ro), so Backrest can never
7 + # change or delete your original data. Backups are stored in /repos.
8 + #
9 + # Setup:
10 + # 1. Create the folders data, config, cache and the backup target first
11 + # 2. Start the stack and open http://NAS-IP:9898
12 + # 3. Set a username/password on first start (don't expose the UI without it)
13 + # 4. Add a repository with path /repos/<name> and a strong password
14 + # 5. Create a plan per source (e.g. /source/immich) with schedule + retention
15 + #
16 + # Adjust:
17 + # - /volume2/docker/backrest → your own Docker folder
18 + # (my Docker runs on an NVMe volume = volume2, usually it's volume1)
19 + # - Sources: these are examples from my setup, replace with your own paths.
20 + # Mount them under /source/... and keep them read-only (:ro)
21 + # - Target: /volume3/DockerBackup/restic → a different disk/volume than
22 + # your data, otherwise a disk failure takes data and backup at once
23 + #
24 + # Tips:
25 + # - SAVE YOUR REPOSITORY PASSWORD SOMEWHERE ELSE (e.g. password manager on
26 + # another device). Without it, your backups can't be restored – ever.
27 + # - Databases: back up dumps (here /source/db-dumps) instead of live DB
28 + # files, a running database can end up inconsistent in the backup.
29 + # I create the dumps separately (e.g. Vaultwarden, Paperless) – the app
30 + # data folders are still backed up for attachments, keys and media.
31 + # - Restore: sources are read-only, so restore to /repos/restore or download
32 + # files via the web UI, then copy them back manually.
33 + # - Keep "hostname" fixed – restic uses it to identify the snapshots.
34 +
35 + services:
36 + backrest:
37 + image: garethgeorge/backrest:latest
38 + container_name: Backrest
39 + hostname: backrest
40 + security_opt:
41 + - no-new-privileges:true
42 + environment:
43 + TZ: Europe/Berlin
44 + BACKREST_DATA: /data
45 + BACKREST_CONFIG: /config/config.json
46 + XDG_CACHE_HOME: /cache
47 + volumes:
48 + - /volume2/docker/backrest/data:/data:rw
49 + - /volume2/docker/backrest/config:/config:rw
50 + - /volume2/docker/backrest/cache:/cache:rw
51 + # Sources (read-only) – examples, replace with your own
52 + - /volume1/DockerHDD/immich/upload:/source/immich:ro
53 + - /volume2/docker/vaultwarden/data:/source/vaultwarden:ro
54 + - /volume2/docker/paperlessngx/data:/source/paperless/data:ro
55 + - /volume1/DockerHDD/paperlessngx/media:/source/paperless/media:ro
56 + - /volume2/docker/dockhand:/source/dockhand:ro
57 + - /volume2/docker/db-dumps:/source/db-dumps:ro
58 + # Backup target
59 + - /volume3/DockerBackup/restic:/repos:rw
60 + ports:
61 + - 9898:9898
62 + restart: unless-stopped