- ZFS : File system
- Wireguard : VPN tunnel protocol
- Headscale : Tailscale control server (replaces wg-easy + dnsmasq)
- Caddy : reverse proxy
- Samba : shared folder
- Immich : photo management
- Joplin : Markdown note app
- Uptime Kuma : monitoring
Main compose file includes domain-specific stacks:
compose/infra/compose.yml: headscale + caddycompose/immich/compose.yml: immich servicescompose/apps/compose.yml: joplin + uptime-kuma + flash-backendcompose/samba/compose.yml: samba
- Raspberry Pi that listens for ZFS with mbuffer and corresponding
systemdservice:
#!/bin/bash
TARGET_DATASET="magenta-backup/data"
MBUFFER_PORT=9090
MBUFFER_MEM="1G"
MBUFFER_BLOCK="128k"
sudo mbuffer -q -Q -m "$MBUFFER_MEM" -s "$MBUFFER_BLOCK" -I "$MBUFFER_PORT" | \
sudo zfs receive -uF "$TARGET_DATASET"[Unit]
Description=ZFS Receive via mbuffer
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/home/pierre/zfs-receive-mbuffer.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target
- ZFS mbuffer receive should also be in a cron job since when receiving is done, the process is terminated
- Backup destination datasets on Raspberry Pi should stay read-only for normal usage, otherwise next incremental receive can fail with "destination has been modified"
- Set a timezone if you want your cron job to run when expected
zfs-backup.shin a cron job at 3am (since Immich database backup is at 2am)- To get backup alerts in Uptime Kuma:
- Create a
Pushmonitor in Uptime Kuma - Copy the generated push URL (
https://<kuma>/api/push/<token>) - Set
UPTIME_KUMA_PUSH_URLinscript/zfs-backup.sh - Script sends
status=upon success andstatus=downon failure automatically - Since the backup runs once per day at 3am, set the expected push interval to about
24hand give it a grace window like26hor30h
- Create a