Commit 21fdf2

2026-03-13 11:14:56 Manuel Weiser: docs: Update admin documentation to include database backup and restore features
docs/de/00-inhalt.md ..
@@ 22,7 22,7 @@
| 8 | [Lagerorte (Locations)](/Docs/De/08-Lagerorte) | Lagerplätze und RFID-Integration |
| 9 | [Drucker (Printers)](/Docs/De/09-Drucker) | 3D-Drucker verwalten und integrieren |
| 10 | [Einstellungen (Settings)](/Docs/De/10-Einstellungen) | Profil und Passwort ändern |
- | 11 | [Admin-Bereich](/Docs/De/11-Admin) | Benutzer, Rollen, Geräte, Zusatzfelder, System |
+ | 11 | [Admin-Bereich](/Docs/De/11-Admin) | Benutzer, Rollen, Geräte, Zusatzfelder, System, Backup |
| 12 | [Farbverwaltung](/Docs/De/12-Farbverwaltung) | Farben für Filamente definieren |
| 13 | [Tipps & Häufige Fragen](/Docs/De/13-Faq) | FAQ und Empfehlungen |
| 14 | [Plugin: BambuLab](/Docs/De/14-Plugin-Bambulab) | BambuLab-Druckertreiber-Plugin |
docs/de/11-admin.md ..
@@ 15,6 15,7 @@
| **Devices** | Geräte-Token-Verwaltung |
| **System Extra Fields** | Systemweite Zusatzfelder für Spulen und Filamente |
| **System** | Plugins und Systemverwaltung |
+ | **Database Backup** | Datenbank-Backups exportieren und wiederherstellen |
| **OIDC / SSO** | OpenID Connect Single Sign-On Konfiguration |
---
@@ 197,7 198,84 @@
---
- ## 11.6 OIDC / SSO
+ ## 11.6 Datenbank-Backup & Wiederherstellung
+
+ **URL:** `http(s)://url/admin/backup`
+
+ > ⚠️ **Hinweis:** Alle Backup- und Wiederherstellungsfunktionen sind ausschließlich für **Superadmins** verfügbar.
+
+ Der Backup-Bereich bietet umfassende Möglichkeiten, die FilaMan-Datenbank zu sichern und wiederherzustellen. Es stehen zwei Backup-Modi zur Verfügung: **Vollständiges Backup** (alle Daten) und **Inventar-Backup** (nur Bestandsdaten).
+
+ ### Vollständiges Backup exportieren
+
+ Exportiert **alle Daten** der Datenbank als JSON-Datei, einschließlich:
+ - Benutzer, Passwörter, API-Keys und Sessions
+ - Rollen und Berechtigungen
+ - Geräte und Plugins
+ - Alle Bestandsdaten (Hersteller, Filamente, Spulen, Drucker, Farben, Lagerorte etc.)
+
+ Klicken Sie auf **„Export Backup"**, um die Datei herunterzuladen. Der Dateiname enthält automatisch einen Zeitstempel (z. B. `filaman_backup_20260313_120000.json`).
+
+ > ⚠️ **Sicherheitshinweis:** Die exportierte Datei enthält **sensible Daten** (Passwort-Hashes, API-Schlüssel). Bewahren Sie diese Datei sicher auf und teilen Sie sie nicht mit Dritten!
+
+ ### Vollständiges Backup importieren
+
+ Stellt ein zuvor exportiertes vollständiges Backup wieder her.
+
+ 1. Wählen Sie eine `.json`-Backup-Datei über den Datei-Upload aus
+ 2. Klicken Sie auf **„Import Backup"**
+ 3. Bestätigen Sie den Vorgang im Bestätigungsdialog
+ 4. Ein Fortschrittsbalken zeigt den Status des Imports an
+ 5. Nach erfolgreichem Import wird die Seite automatisch neu geladen
+
+ > 🚨 **Achtung:** Beim Import werden **ALLE bestehenden Daten gelöscht** und durch die Daten aus dem Backup ersetzt! Vor dem Import wird automatisch ein Sicherungs-Backup der aktuellen Daten erstellt.
+
+ ### Inventar exportieren
+
+ Exportiert **nur Bestandsdaten** als JSON-Datei:
+ - Hersteller, Farben, Lagerorte
+ - Filamente und Spulen
+ - Drucker und Drucker-Slots
+ - Bewertungen, Ereignisse und Zusatzfelder
+
+ **Nicht enthalten** sind: Benutzer, Passwörter, API-Keys, Sessions, Rollen, Berechtigungen, Geräte, Plugins und OIDC-Einstellungen.
+
+ Klicken Sie auf **„Export Inventory"**, um die Datei herunterzuladen (z. B. `filaman_inventory_20260313_120000.json`).
+
+ > ✅ **Sicher zum Teilen:** Der Inventar-Export enthält keine sensiblen Authentifizierungsdaten und kann bedenkenlos zwischen FilaMan-Instanzen ausgetauscht werden.
+
+ ### Inventar importieren
+
+ Importiert Bestandsdaten von einer anderen FilaMan-Instanz. Benutzer, Rollen, Geräte und Plugins bleiben dabei **unverändert**.
+
+ 1. Wählen Sie eine `.json`-Inventar-Datei über den Datei-Upload aus
+ 2. Klicken Sie auf **„Import Inventory"**
+ 3. Bestätigen Sie den Vorgang im Bestätigungsdialog
+ 4. Der Import wird mit einem Fortschrittsbalken angezeigt
+
+ > ⚠️ **Achtung:** Beim Import werden die **bestehenden Bestandsdaten gelöscht** und durch die importierten Daten ersetzt! Benutzer und Einstellungen bleiben erhalten. Vor dem Import wird automatisch ein Sicherungs-Backup erstellt.
+
+ ### SQLite-Backups
+
+ > **Hinweis:** Dieser Bereich ist nur sichtbar, wenn FilaMan mit einer **SQLite-Datenbank** betrieben wird. Bei MySQL oder PostgreSQL müssen Backups extern durch den Administrator verwaltet werden.
+
+ FilaMan erstellt automatisch SQLite-Backups der Datenbank (täglich und vor Updates). Diese werden im Backup-Verzeichnis gespeichert (Standard: `/app/data/backups`).
+
+ Die Tabelle zeigt alle vorhandenen Backups mit folgenden Informationen:
+
+ | Spalte | Beschreibung |
+ |--------|-------------|
+ | **File** | Dateiname des Backups |
+ | **Date** | Erstellungsdatum |
+ | **Size** | Dateigröße |
+
+ Für jedes Backup stehen zwei Aktionen zur Verfügung:
+ - **Restore** — Stellt die Datenbank aus diesem Backup wieder her. Vor der Wiederherstellung wird automatisch ein Backup der aktuellen Datenbank erstellt. Nach der Wiederherstellung muss die Anwendung neu geladen werden.
+ - **Delete** — Löscht die ausgewählte Backup-Datei dauerhaft.
+
+ ---
+
+ ## 11.7 OIDC / SSO
**URL:** `http(s)://url/admin/oidc`
@@ 228,7 306,7 @@
---
- ## 11.7 Gefahrenzone
+ ## 11.8 Gefahrenzone
Am unteren Ende des Admin-Panels befindet sich die rot markierte **Danger Zone** mit einer kritischen Aktion:
docs/en/00-contents.md ..
@@ 22,7 22,7 @@
| 8 | [Locations](/Docs/En/08-Locations) | Storage locations and RFID integration |
| 9 | [Printers](/Docs/En/09-Printers) | Managing and integrating 3D printers |
| 10 | [Settings](/Docs/En/10-Settings) | Updating profile and password |
- | 11 | [Admin Area](/Docs/En/11-Admin) | Users, roles, devices, extra fields, system |
+ | 11 | [Admin Area](/Docs/En/11-Admin) | Users, roles, devices, extra fields, system, backup |
| 12 | [Color Management](/Docs/En/12-Colors) | Defining colors for filaments |
| 13 | [Tips & FAQ](/Docs/En/13-Faq) | Frequently asked questions |
| 14 | [Plugin: BambuLab](/Docs/En/14-Plugin-Bambulab) | BambuLab printer driver plugin |
docs/en/11-admin.md ..
@@ 15,6 15,7 @@
| **Devices** | Device token management |
| **System Extra Fields** | System-wide extra fields for spools and filaments |
| **System** | Plugins and system management |
+ | **Database Backup** | Export and restore database backups |
| **OIDC / SSO** | OpenID Connect Single Sign-On configuration |
---
@@ 197,7 198,84 @@
---
- ## 11.6 OIDC / SSO
+ ## 11.6 Database Backup & Restore
+
+ **URL:** `http(s)://url/admin/backup`
+
+ > ⚠️ **Note:** All backup and restore functions are only available to **superadmins**.
+
+ The Backup section provides comprehensive tools to back up and restore the FilaMan database. Two backup modes are available: **Full Backup** (all data) and **Inventory Backup** (inventory data only).
+
+ ### Export Full Backup
+
+ Exports **all data** from the database as a JSON file, including:
+ - Users, passwords, API keys, and sessions
+ - Roles and permissions
+ - Devices and plugins
+ - All inventory data (manufacturers, filaments, spools, printers, colors, locations, etc.)
+
+ Click **"Export Backup"** to download the file. The filename automatically includes a timestamp (e.g. `filaman_backup_20260313_120000.json`).
+
+ > ⚠️ **Security warning:** The exported file contains **sensitive data** (password hashes, API keys). Store this file securely and do not share it with others!
+
+ ### Import Full Backup
+
+ Restores a previously exported full backup.
+
+ 1. Select a `.json` backup file using the file upload
+ 2. Click **"Import Backup"**
+ 3. Confirm the operation in the confirmation dialog
+ 4. A progress bar shows the import status
+ 5. After a successful import, the page reloads automatically
+
+ > 🚨 **Warning:** Importing will **DELETE ALL existing data** and replace it with the backup data! An automatic safety backup of the current data is created before the import.
+
+ ### Export Inventory
+
+ Exports **only inventory data** as a JSON file:
+ - Manufacturers, colors, locations
+ - Filaments and spools
+ - Printers and printer slots
+ - Ratings, events, and extra fields
+
+ **Not included:** Users, passwords, API keys, sessions, roles, permissions, devices, plugins, and OIDC settings.
+
+ Click **"Export Inventory"** to download the file (e.g. `filaman_inventory_20260313_120000.json`).
+
+ > ✅ **Safe to share:** The inventory export contains no sensitive authentication data and can be safely exchanged between FilaMan instances.
+
+ ### Import Inventory
+
+ Imports inventory data from another FilaMan instance. Users, roles, devices, and plugins remain **unchanged**.
+
+ 1. Select a `.json` inventory file using the file upload
+ 2. Click **"Import Inventory"**
+ 3. Confirm the operation in the confirmation dialog
+ 4. The import progress is shown with a progress bar
+
+ > ⚠️ **Warning:** Importing will **delete existing inventory data** and replace it with the imported data! Users and settings are preserved. An automatic safety backup is created before the import.
+
+ ### SQLite Backups
+
+ > **Note:** This section is only visible when FilaMan is running with a **SQLite database**. For MySQL or PostgreSQL, backups must be managed externally by the administrator.
+
+ FilaMan automatically creates SQLite database backups (daily and before updates). These are stored in the backup directory (default: `/app/data/backups`).
+
+ The table shows all available backups with the following information:
+
+ | Column | Description |
+ |--------|-------------|
+ | **File** | Backup filename |
+ | **Date** | Creation date |
+ | **Size** | File size |
+
+ Two actions are available for each backup:
+ - **Restore** — Restores the database from this backup. An automatic backup of the current database is created before the restore. After restoring, the application must be reloaded.
+ - **Delete** — Permanently deletes the selected backup file.
+
+ ---
+
+ ## 11.7 OIDC / SSO
**URL:** `http(s)://url/admin/oidc`
@@ 228,7 306,7 @@
---
- ## 11.7 Danger Zone
+ ## 11.8 Danger Zone
At the bottom of the Admin Panel you will find the red-highlighted **Danger Zone** with one critical action:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9