restore.sh aktualisiert

main
sebastian.serfling 2026-03-18 12:09:41 +00:00
parent 6890fc4992
commit 7bf76bbfed
1 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# ============================================================================= # =============================================================================
# /opt/windmill-restore/restore.sh # /opt/windmill-restore/restore.sh
# Windmill Backup Restore Worker # Windmill Backup Restore Worker
# Version: 1.0.16 # Version: 1.0.17
# #
# Unterstützt sowohl VM (qm) als auch CT (pct) Backups. # Unterstützt sowohl VM (qm) als auch CT (pct) Backups.
# Backup-Typ wird automatisch aus dem Backup-Pfad erkannt (vm/ oder ct/). # Backup-Typ wird automatisch aus dem Backup-Pfad erkannt (vm/ oder ct/).
@ -73,8 +73,11 @@ done
LOG_DIR="/opt/windmill-restore/logs" LOG_DIR="/opt/windmill-restore/logs"
mkdir -p "$LOG_DIR" mkdir -p "$LOG_DIR"
SAFE_CLIENT="${CLIENT_NAME//\//_}" SAFE_CLIENT="${CLIENT_NAME//\//_}"
LOG_FILE="$LOG_DIR/${SAFE_CLIENT}_$(date +%Y%m%d_%H%M%S).log" SAFE_CLIENT="${SAFE_CLIENT//:/_}"
exec > >(tee -a "$LOG_FILE") 2>&1 # LOG_FILE = gleicher Name wie nohup-Redirect aus Step D/E
# So landen alle Ausgaben in derselben Datei
LOG_FILE="$LOG_DIR/${SAFE_CLIENT}.log"
exec >> "$LOG_FILE" 2>&1
# ── Backup-Pfad zerlegen ────────────────────────────────────────────────────── # ── Backup-Pfad zerlegen ──────────────────────────────────────────────────────
# Format: "tnp-Invest-GmbH:vm/100/2024-01-15T02:00:00Z" # Format: "tnp-Invest-GmbH:vm/100/2024-01-15T02:00:00Z"