Duplicati Post-Backup-Script: scripts/stop-webdav.cmd

Made-with: Cursor
This commit is contained in:
2026-02-28 12:46:56 +01:00
parent d5bf242588
commit de2484bdc3
3 changed files with 24 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ WebDAV erreichbar unter `http://localhost:3005`.
## Clients
- **Duplicati** Backup-Destination (Pre-Start: `scripts/start-webdav.cmd`)
- **Duplicati** Backup-Destination (Pre: `scripts/start-webdav.cmd`, Post: `scripts/stop-webdav.cmd`)
- **rclone** `rclone config` → WebDAV, URL `http://127.0.0.1:3005`
- **Windows Explorer** Netzlaufwerk verbinden

View File

@@ -58,13 +58,19 @@ CRYPTO_SECRET=6KYQBP847D4ATSFA
# WEBDAV_PASS=geheim
```
## Duplicati Pre-Start (optional)
## Duplicati Pre-/Post-Scripts (optional)
Falls der WebDAV-Server nicht dauerhaft läuft, kann Duplicati ihn vor dem Backup starten:
Falls der WebDAV-Server nicht dauerhaft läuft, kann Duplicati ihn vor dem Backup starten und danach beenden:
**Einstellungen → Erweitert → Scripts → Vor dem Backup ausführen:**
| Script | Duplicati-Einstellung | Pfad |
|--------|------------------------|------|
| Start | Vor dem Backup ausführen | `scripts\start-webdav.cmd` |
| Stop | Nach dem Backup ausführen | `scripts\stop-webdav.cmd` |
**Einstellungen → Erweitert → Scripts** jeweils den vollen Pfad eintragen, z.B.:
```
C:\Pfad\zu\internxt-webdav\scripts\start-webdav.cmd
C:\Pfad\zu\internxt-webdav\scripts\stop-webdav.cmd
```
Der Server startet im Hintergrund und ist nach ~5 Sekunden bereit.

14
scripts/stop-webdav.cmd Normal file
View File

@@ -0,0 +1,14 @@
@echo off
REM Duplicati Post-Backup: WebDAV-Server beenden
REM In Duplicati: Einstellungen -> Erweitert -> Scripts -> Nach dem Backup ausfuehren
REM Pfad: C:\Pfad\zu\internxt-webdav\scripts\stop-webdav.cmd
REM Prozess auf Port 3005 finden und beenden
for /f "tokens=5" %%a in ('netstat -ano 2^>nul ^| findstr ":3005.*LISTENING"') do (
taskkill /PID %%a /F > nul 2>&1
echo WebDAV-Server beendet (PID %%a).
exit /b 0
)
echo WebDAV-Server war nicht aktiv.
exit /b 0