README vereinheitlicht, deutsche Fassung, Release-Details nach docs/RELEASE-NOTES.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael RollandClaude Opus 5.5 committed 2026-11-24 12:19:05 +01:00
1 parent ac055497b7
commit 2700abe875
3 files changed
+211 -100

No files matched your search

+79
View File
@@ -0,0 +1,79 @@
# URBM – Unraid Restic Backup Manager
[English](README.md) | **Deutsch**
URBM ist ein natives Unraid-7-Plugin, das verschlüsselte, deduplizierte und
versionierte Backups mit [Restic](https://restic.net/) verwaltet, dazu geplante
direkte Rsync-Kopien. Unabhängiges Community-Plugin, ohne Verbindung zu oder
Unterstützung durch Lime Technology, Inc.
## Funktionen
- Quellen: Shares, appdata, Docker-Metadaten und -Daten (Bind-Mounts und benannte
Volumes), VM-Definitionen und -Disks, der Unraid-Boot-Stick
- Ziele: lokal, SFTP, SMB oder NFS
- USB-Flash-Jobs sichern den Dateibaum von `/boot` und optional das ganze
Boot-Gerät als `urbm-usb-flash.img` für eine Wiederherstellung auf Blockebene
- Rsync-Jobs mit Ordnerauswahl und Schaltern für Überschreiben, Löschen, Rechte,
Eigentümer, Zeitstempel, Links, ACLs, xattrs, Prüfsummen und Probelauf;
Platzprüfung vor dem echten Kopieren
- Live- oder Stopp-Modus für Docker-/VM-Jobs, Zeitpläne, Repository-Prüfungen,
Wiederherstellung, Benachrichtigungen, Laufprotokolle im WebGUI
## Voraussetzungen
Unraid 7. Docker- und VM-Jobs nutzen die normalen Befehle `docker` und `virsh`;
SMB-/NFS-Ziele nutzen die Mount-Helfer von Unraid.
## Installation
Im Unraid-WebGUI **Plugins → Install Plugin** öffnen und die Manifest-URL einfügen:
```text
<repository-url>/raw/branch/main/dist/urbm.plg
```
Dann die URBM-Seite im WebGUI öffnen, ein Ziel (Restic-Repository) anlegen und Jobs
erstellen. Beim Deinstallieren bleibt die Konfiguration erhalten, damit Repositories
wiederherstellbar bleiben.
## Konfiguration
Alles im WebGUI. Dauerhafte Konfiguration und mit AES-256-GCM verschlüsselte
Geheimnisse liegen in `/boot/config/plugins/urbm`; Laufzeit-Geheimnisse und
temporäre Metadaten unter `/run/urbm` werden nach jedem Vorgang gelöscht.
## Sicherheit
- Der Dienst `urbmd` lauscht auf keinem TCP-Port; die WebGUI-Seite leitet
angemeldete Anfragen an den Unix-Socket `/run/urbm/urbm.sock` weiter.
- Restic-Passwörter laufen über temporäre Dateien nur für root, nie über die Befehlszeile.
- Das automatische Entsperren beim Booten schützt vor versehentlicher Preisgabe,
nicht vor kompromittiertem root oder dem Diebstahl des ganzen USB-Sticks.
- Wiederherstellung am Originalort braucht eine ausdrückliche Bestätigung;
geschützte Systempfade werden abgelehnt.
- Live-Backups garantieren keine Datenbankkonsistenz; dafür den Stopp-Modus nutzen.
Die normale Repository-Prüfung ist kein vollständiger Wiederherstellungstest.
## Entwicklung
Voraussetzungen: Go 1.23+, Node.js, `curl`, `bzip2`, `tar`, `sha256sum`.
```sh
./scripts/check.sh
./packaging/build-package.sh # Paket landet in dist/
URBM_TEST_RSYNC=/pfad/zu/rsync go test ./internal/rsync -run TestRealRsync -v
```
Vor einer Veröffentlichung `REPLACE_DURING_RELEASE` im kopierten PLG-Manifest durch
die Paket-Prüfsumme ersetzen. Restic 0.19.0 ist fest eingestellt und wird beim Bauen
per Prüfsumme kontrolliert. Verhalten je Release (Englisch): [docs/RELEASE-NOTES.md](docs/RELEASE-NOTES.md).
## Stand
Steuerung und Adapter sind umgesetzt (MVP). Hardware- und Ende-zu-Ende-Kompatibilität
muss vor einem stabilen Release auf unterstützten Unraid-7-Versionen geprüft werden.
## Lizenz
GPL-3.0-or-later, siehe [LICENSE](LICENSE).
+61 -100
View File
@@ -1,117 +1,78 @@
# URBM - Unraid Restic Backup Manager
# URBM – Unraid Restic Backup Manager
URBM is a native Unraid 7 plugin that manages encrypted, deduplicated and versioned backups through Restic. It supports shares, appdata, Docker metadata and data, VM definitions and disks, and the Unraid boot drive. Destinations can be local, SFTP, SMB or NFS.
**English** | [Deutsch](README.de.md)
USB flash jobs always back up the browsable `/boot` file tree and can optionally stream the complete physical boot device into Restic as `urbm-usb-flash.img` for block-level recovery to an equal-sized or larger replacement device.
URBM is a native Unraid 7 plugin that manages encrypted, deduplicated and
versioned backups with [Restic](https://restic.net/), plus scheduled direct Rsync
copies. It is an independent community plugin, not affiliated with or endorsed by
Lime Technology, Inc.
URBM also supports scheduled direct Rsync copies. Sources and the destination are selected with folder browsers; overwrite, destination deletion, permissions, ownership, timestamps, links, ACLs, extended attributes, checksum comparison, and dry-run behavior are configured without free-form shell arguments.
## Features
URBM is an independent community plugin and is not affiliated with or endorsed by Lime Technology, Inc.
- Backup sources: shares, appdata, Docker metadata and data (bind mounts and
named volumes), VM definitions and disks, the Unraid boot drive
- Destinations: local, SFTP, SMB or NFS
- USB flash jobs back up the `/boot` file tree and optionally the whole boot
device as `urbm-usb-flash.img` for block-level recovery
- Rsync jobs with folder browsers and checkboxes for overwrite, deletion,
permissions, ownership, timestamps, links, ACLs, xattrs, checksums and dry run;
space preflight before a real transfer
- Live or stop mode for Docker/VM jobs, schedules, repository checks, restores,
notifications, run logs in the WebGUI
## Architecture
## Requirements
- `urbmd` is a static Go daemon with a single global task queue and an HTTP API on `/run/urbm/urbm.sock`.
- The Unraid PHP page proxies authenticated WebGUI requests to that Unix socket.
- Persistent configuration and AES-256-GCM encrypted secrets live in `/boot/config/plugins/urbm`.
- Runtime secrets and transient metadata live below `/run/urbm` and are deleted after each operation.
- Restic 0.19.0 is pinned and checksum-verified by the package build.
Unraid 7. Docker and VM jobs use the standard `docker` and `virsh` commands;
SMB/NFS destinations use Unraid's mount helpers.
## Installation
In the Unraid WebGUI open **Plugins → Install Plugin** and paste the manifest URL:
```text
<repository-url>/raw/branch/main/dist/urbm.plg
```
Then open the URBM page in the WebGUI, add a destination (Restic repository) and
create jobs. Configuration is kept when the plugin is uninstalled, so repositories
stay recoverable.
## Configuration
Everything is done in the WebGUI. Persistent configuration and AES-256-GCM
encrypted secrets live in `/boot/config/plugins/urbm`; runtime secrets and
temporary metadata live below `/run/urbm` and are removed after each operation.
## Security
- The daemon `urbmd` has no TCP listener; the WebGUI page proxies authenticated
requests to the Unix socket `/run/urbm/urbm.sock`.
- Restic passwords are passed through root-only temporary files, never on the command line.
- Automatic unlock at boot protects against accidental disclosure, not against
root compromise or theft of the whole flash drive.
- In-place restores need explicit confirmation; protected system roots are refused.
- Live backups do not guarantee database consistency; use stop mode for that.
The standard repository check is not a full restore test.
## Development
Requirements: Go 1.23+, Node.js, `curl`, `bzip2`, `tar`, and `sha256sum`.
Requirements: Go 1.23+, Node.js, `curl`, `bzip2`, `tar`, `sha256sum`.
```bash
```sh
./scripts/check.sh
./packaging/build-package.sh
./packaging/build-package.sh # package goes to dist/
URBM_TEST_RSYNC=/path/to/rsync go test ./internal/rsync -run TestRealRsync -v
```
The package is written to `dist/`. Replace `REPLACE_DURING_RELEASE` in the copied PLG manifest with the generated package checksum before publishing a release.
Replace `REPLACE_DURING_RELEASE` in the copied PLG manifest with the package
checksum before publishing. Restic 0.19.0 is pinned and checksum-verified by the
build. Behaviour details per release: [docs/RELEASE-NOTES.md](docs/RELEASE-NOTES.md).
## Unraid installation
## Status
Install the generated manifest URL through Unraid's Plugins page:
The control plane and adapters are implemented (MVP). Hardware and end-to-end
compatibility must be validated on supported Unraid 7 releases before a stable release.
```text
https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg
```
## License
Configuration is retained when uninstalling so repositories remain recoverable.
## Security model
The daemon has no TCP listener. Restic passwords are passed through root-only temporary files, never command-line arguments. Automatic boot unlock protects against accidental disclosure but does not protect against root compromise or theft of the complete flash drive. In-place restores require explicit confirmation and protected system roots are rejected.
## Current scope
The code implements the MVP control plane and adapters. Docker and VM operations require the standard Unraid `docker` and `virsh` commands. Managed SMB/NFS mounts require the corresponding Unraid mount helpers. Hardware and end-to-end compatibility must be validated on supported Unraid 7 releases before a stable publication.
### Backup safety (2026.09.21.r001)
Repository checks report success/failure through configured notification targets. The
standard check verifies repository structure; it is not a full data-read or restore test.
Docker jobs discover bind mounts and named volumes. Live backups do not guarantee
application/database consistency. Use stop mode for coordinated offline backups.
Stop mode restarts only workloads that were running before preparation; ambiguous
paused/restarting states fail safely. Each restart has a 120-second deadline and
recovery continues after individual failures. Shutdown waits for cleanup; the rc
script refuses a forced kill or overlapping restart if cleanup exceeds five minutes.
Hard crashes or power loss still require checking workload state and backup results.
### Mirror an array disk to a mounted USB disk (2026.09.27.r001)
Create an Rsync job and select the mounted array disk, for example `/mnt/disk1`,
as the source. Select the USB disk under `/mnt/disks`, for example
`/mnt/disks/USB-Backup`, as the target. URBM copies the selected directory, so this
creates `/mnt/disks/USB-Backup/disk1` and copies its contents there. Select the USB
root, not its existing `disk1` subdirectory, to avoid nesting another `disk1`.
Enable overwrite to update existing files. Enable destination deletion for a
mirror that also removes files deleted from the source; deletion is off by default.
Use the dry-run option to preview a job without changing files. The USB disk must
already be mounted, for example through Unassigned Devices. URBM checks array and
USB mounts before starting the job and refuses leftover directories after an
unmount. Keep the USB disk connected throughout the run. Reload the page after
mounting a new array disk to refresh the available sources.
### Rsync diagnostics (2026.09.27.r002)
Run logs start collapsed and retain your open/closed selection during refresh.
New Rsync runs log the source paths, target, dry-run mode, overwrite/delete and
comparison options, exclusions, execution phases, up to 20 itemized change
examples, and final file/byte/deletion totals. Deletion counts include directories
and symlinks. Byte totals describe the contents of transferred files, not protocol
traffic. A dry run reports planned changes and records zero bytes actually copied;
its notification explicitly states that no changes were made. Historical logs
cannot be reconstructed with these additional details.
For an integration test against Rsync 3.x, run
`URBM_TEST_RSYNC=/path/to/rsync go test ./internal/rsync -run TestRealRsync -v`.
The test uses temporary directories only and checks that a dry run changes nothing,
that a subsequent copy matches the planned counts, and that another comparison
then finds no changes.
### Rsync space preflight (2026.10.09.r001)
The read-only dry run reports transfer volume separately from a conservative
additional-space estimate. The estimate sums positive growth of transferred
regular files, adds the largest transferred file as temporary-copy headroom,
and reserves 64 KiB per changed entry plus 1% (at least 64 MiB). Replacement
credit is limited to the smaller of the existing logical size and allocated
blocks; hardlinks and known Linux CoW filesystems (ZFS, Btrfs, XFS) receive no
replacement credit. Shrinking files and `--delete-delay` deletions never reduce
the estimate. Consequently renamed backup generations still require space for
the new generation before the old generation is deleted.
Rsync-escaped filenames are decoded once. Incomplete statistics, unreadable
paths, ambiguous source basenames, destination symlinks and nested destination
filesystems stop preflight with “not reliably determinable”, rather than a
misleading “insufficient space”. The check never creates a destination or starts
a real transfer. Existing job options and the explicit skip-check override are
unchanged. Results appear in the job's existing live log in the WebGUI.
This remains an estimate, not a reservation: concurrent writers, quotas,
filesystem-specific allocation/compression and changes after the dry run can
still cause a later write failure. Production rsync errors remain authoritative.
Tests using real rsync run only in temporary fixtures via `URBM_TEST_RSYNC`.
GPL-3.0-or-later, see [LICENSE](LICENSE).
+71
View File
@@ -0,0 +1,71 @@
# URBM release notes and behaviour details
## Backup safety (2026.09.21.r001)
Repository checks report success/failure through configured notification targets. The
standard check verifies repository structure; it is not a full data-read or restore test.
Docker jobs discover bind mounts and named volumes. Live backups do not guarantee
application/database consistency. Use stop mode for coordinated offline backups.
Stop mode restarts only workloads that were running before preparation; ambiguous
paused/restarting states fail safely. Each restart has a 120-second deadline and
recovery continues after individual failures. Shutdown waits for cleanup; the rc
script refuses a forced kill or overlapping restart if cleanup exceeds five minutes.
Hard crashes or power loss still require checking workload state and backup results.
## Mirror an array disk to a mounted USB disk (2026.09.27.r001)
Create an Rsync job and select the mounted array disk, for example `/mnt/disk1`,
as the source. Select the USB disk under `/mnt/disks`, for example
`/mnt/disks/USB-Backup`, as the target. URBM copies the selected directory, so this
creates `/mnt/disks/USB-Backup/disk1` and copies its contents there. Select the USB
root, not its existing `disk1` subdirectory, to avoid nesting another `disk1`.
Enable overwrite to update existing files. Enable destination deletion for a
mirror that also removes files deleted from the source; deletion is off by default.
Use the dry-run option to preview a job without changing files. The USB disk must
already be mounted, for example through Unassigned Devices. URBM checks array and
USB mounts before starting the job and refuses leftover directories after an
unmount. Keep the USB disk connected throughout the run. Reload the page after
mounting a new array disk to refresh the available sources.
## Rsync diagnostics (2026.09.27.r002)
Run logs start collapsed and retain your open/closed selection during refresh.
New Rsync runs log the source paths, target, dry-run mode, overwrite/delete and
comparison options, exclusions, execution phases, up to 20 itemized change
examples, and final file/byte/deletion totals. Deletion counts include directories
and symlinks. Byte totals describe the contents of transferred files, not protocol
traffic. A dry run reports planned changes and records zero bytes actually copied;
its notification explicitly states that no changes were made. Historical logs
cannot be reconstructed with these additional details.
For an integration test against Rsync 3.x, run
`URBM_TEST_RSYNC=/path/to/rsync go test ./internal/rsync -run TestRealRsync -v`.
The test uses temporary directories only and checks that a dry run changes nothing,
that a subsequent copy matches the planned counts, and that another comparison
then finds no changes.
## Rsync space preflight (2026.10.09.r001)
The read-only dry run reports transfer volume separately from a conservative
additional-space estimate. The estimate sums positive growth of transferred
regular files, adds the largest transferred file as temporary-copy headroom,
and reserves 64 KiB per changed entry plus 1% (at least 64 MiB). Replacement
credit is limited to the smaller of the existing logical size and allocated
blocks; hardlinks and known Linux CoW filesystems (ZFS, Btrfs, XFS) receive no
replacement credit. Shrinking files and `--delete-delay` deletions never reduce
the estimate. Consequently renamed backup generations still require space for
the new generation before the old generation is deleted.
Rsync-escaped filenames are decoded once. Incomplete statistics, unreadable
paths, ambiguous source basenames, destination symlinks and nested destination
filesystems stop preflight with “not reliably determinable”, rather than a
misleading “insufficient space”. The check never creates a destination or starts
a real transfer. Existing job options and the explicit skip-check override are
unchanged. Results appear in the job's existing live log in the WebGUI.
This remains an estimate, not a reservation: concurrent writers, quotas,
filesystem-specific allocation/compression and changes after the dry run can
still cause a later write failure. Production rsync errors remain authoritative.
Tests using real rsync run only in temporary fixtures via `URBM_TEST_RSYNC`.