Debian 571f51ba9a feat(backup): pg_dump + state-tarball + daily auto + UI
Production-Box braucht Backups — bisher keine. Jetzt komplette
Pipeline:

Backend (internal/services/backup/):
  - Output: /var/backups/edgeguard/eg-YYYYMMDD-HHMMSS.tar.gz
  - Inhalt: dump.sql (pg_dump --clean --if-exists --no-owner --no-acl),
    files/setup.json, files/license_key, files/license.cache,
    files/.jwt_fingerprint, files/node.conf, files/acme-account/* +
    manifest.json (Version, kind, hostname, sizes)
  - sha256 während-write via TeeWriter, Size + sha in backups-DB-Row
  - Failure-Path: row mit status=failed + error, kein orphan-tarball
  - Prune(keepN=14) löscht erfolgreiche Backups älter als die letzten N

Migration 0018: backups(id, file, size, sha256, db/files bytes, kind,
status, error, host, started/finished).

Scheduler (cmd/edgeguard-scheduler):
  - 24h-Tick → backup.Run(KindScheduled) + Prune. Beim Boot wird ein
    initialer Backup NICHT sofort gezogen (kein nervöses Spam),
    sondern erst beim nächsten 24h-Slot.

REST (internal/handlers/backup.go):
  GET    /api/v1/backups              — list (newest first)
  POST   /api/v1/backups              — trigger manual (sync, audit'ed)
  GET    /api/v1/backups/:id          — single
  GET    /api/v1/backups/:id/download — sendfile tar.gz
  DELETE /api/v1/backups/:id          — entferne file + row

UI (management-ui/src/pages/Backups):
  - Liste mit Time, File+sha (first 16), Kind-Tag, Status, Size (mit
    DB + Files Aufschlüsselung), Dauer
  - „Backup jetzt erstellen" Button, Refresh, Download, Delete
  - Auto-Refresh 30s
  - Sidebar-Eintrag „Backups" unter System

postinst:
  - /var/backups/edgeguard 0750 edgeguard:edgeguard (enthält sensitive
    pg_dump + license_key → NICHT world-readable)
  - sudoers-Whitelist `sudo -u postgres /usr/bin/pg_dump --clean
    --if-exists --no-owner --no-acl edgeguard` — exakte Form

Verifiziert auf der Box: backups-Tabelle existiert, scheduler logged
„backup enabled tick=24h dir=/var/backups/edgeguard keep_n=14",
pg_dump-via-sudoers liefert 2808 lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 23:08:18 +02:00
2026-05-08 18:45:41 +02:00
2026-05-12 18:25:41 +02:00

EdgeGuard

Native Reverse-Proxy / Loadbalancer / Forward-Proxy / VPN / Firewall — als signiertes .deb für Debian 13 + Ubuntu 24.04, amd64 + arm64.

Status: v0.x — Neufassung des bisherigen Docker-Stacks, parallel zum Bestand proxy-lb-waf.

Installation

curl -fsSL https://get.edgeguard.netcell-it.de | sudo bash

Unterstützte Plattformen: Debian 13 (Trixie), Ubuntu 24.04 LTS (Noble) — amd64 + arm64.

Architektur in Kürze

  • Daten-Services (v1): HAProxy (TLS-Termination + LB + L7-Routing), Squid, WireGuard, Unbound, nftables — alle nativ via APT, Configs aus PostgreSQL generiert.
  • Control-Plane: edgeguard-api (Go/Gin), management-ui (React/AntD), PostgreSQL 16, KeyDB Active-Active.
  • Cluster: N symmetrische Peers, KeyDB AA für Shared State, PG Streaming Replication, Floating-IP des Hosters statt VRRP.
  • Auslieferung: signierte .deb, Update via apt. Update-Trigger via UI/API.

Volle Architektur: docs/architecture.md.

Build

make build       # Host-Architektur
make deb         # amd64 + arm64 .deb
make publish     # deb + Upload Gitea Package Registry

Repo

  • Lokal: /var/www/edgeguard-native
  • Gitea: https://git.netcell-it.de/projekte/edgeguard-native
Description
EdgeGuard Native — Reverse-Proxy / Loadbalancer / Forward-Proxy / VPN / Firewall ohne Docker, .deb-Auslieferung fuer Debian 13
Readme 3 MiB
Languages
Go 51.1%
TypeScript 34.4%
CSS 8.4%
Shell 3.8%
Smarty 1.8%
Other 0.4%