Files
Brancheneinstufung2/backup_volumes_fixed.sh
Floke 0c04b0787f [31f88f42] Keine neuen Commits in dieser Session.
Keine neuen Commits in dieser Session.
2026-03-10 19:17:56 +00:00

26 lines
674 B
Bash

#!/bin/bash
echo "Starte Volume-Backups im aktuellen Verzeichnis..."
# Wir nutzen $(pwd) anstelle von fest kodiertem /app
BACKUP_DIR="$(pwd)/volume_backups"
mkdir -p "$BACKUP_DIR"
volumes=(
"explorer_db_data"
"connector_db_data"
"lead_engine_data"
"gtm_architect_data"
"b2b_marketing_data"
"content_engine_data"
"market_intel_data"
"competitor_analysis_data"
"transcription_uploads"
)
for vol in "${volumes[@]}"; do
echo "Sichere Volume: $vol nach $BACKUP_DIR/${vol}.tar.gz"
docker run --rm -v $vol:/data -v "$BACKUP_DIR":/backup alpine tar czf /backup/${vol}.tar.gz -C /data .
done
echo "Alle Volumes wurden erfolgreich in $BACKUP_DIR gesichert."