Initial commit
Dieser Commit ist enthalten in:
69
backup_before_cleanup.sh
Normale Datei
69
backup_before_cleanup.sh
Normale Datei
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
# Backup-Skript vor dem Cleanup der auskommentierten Routes
|
||||
# Erstellt ein vollständiges Backup des aktuellen Zustands
|
||||
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
BACKUP_DIR="./backups/refactoring_${TIMESTAMP}"
|
||||
|
||||
echo "🔒 Erstelle Backup vor Refactoring-Cleanup..."
|
||||
echo " Timestamp: ${TIMESTAMP}"
|
||||
|
||||
# Backup-Verzeichnis erstellen
|
||||
mkdir -p "${BACKUP_DIR}"
|
||||
|
||||
# 1. Code-Backup
|
||||
echo "📁 Sichere Code..."
|
||||
cp -r v2_adminpanel "${BACKUP_DIR}/v2_adminpanel_backup"
|
||||
|
||||
# Speziell app.py sichern
|
||||
cp v2_adminpanel/app.py "${BACKUP_DIR}/app.py.backup_${TIMESTAMP}"
|
||||
|
||||
# 2. Git-Status dokumentieren
|
||||
echo "📝 Dokumentiere Git-Status..."
|
||||
git status > "${BACKUP_DIR}/git_status.txt"
|
||||
git log --oneline -10 > "${BACKUP_DIR}/git_log.txt"
|
||||
git diff > "${BACKUP_DIR}/git_diff.txt"
|
||||
|
||||
# 3. Blueprint-Übersicht erstellen
|
||||
echo "📊 Erstelle Blueprint-Übersicht..."
|
||||
cat > "${BACKUP_DIR}/blueprint_overview.txt" << EOF
|
||||
Blueprint Migration Status - ${TIMESTAMP}
|
||||
==========================================
|
||||
|
||||
Blueprints erstellt und registriert:
|
||||
- auth_bp (9 routes) - Authentication
|
||||
- admin_bp (10 routes) - Admin Dashboard
|
||||
- license_bp (4 routes) - License Management
|
||||
- customer_bp (7 routes) - Customer Management
|
||||
- resource_bp (7 routes) - Resource Pool
|
||||
- session_bp (6 routes) - Session Management
|
||||
- batch_bp (4 routes) - Batch Operations
|
||||
- api_bp (14 routes) - API Endpoints
|
||||
- export_bp (5 routes) - Export Functions
|
||||
|
||||
Gesamt: 66 Routes in Blueprints
|
||||
|
||||
Status:
|
||||
- Alle Routes aus app.py sind auskommentiert
|
||||
- Blueprints sind aktiv und funktionsfähig
|
||||
- Keine aktiven @app.route mehr in app.py
|
||||
|
||||
Nächste Schritte:
|
||||
1. Auskommentierte Routes entfernen
|
||||
2. Redundante Funktionen bereinigen
|
||||
3. URL-Präfixe implementieren
|
||||
EOF
|
||||
|
||||
# 4. Route-Mapping erstellen
|
||||
echo "🗺️ Erstelle Route-Mapping..."
|
||||
grep -n "# @app.route" v2_adminpanel/app.py > "${BACKUP_DIR}/commented_routes.txt"
|
||||
|
||||
# 5. Zusammenfassung
|
||||
echo ""
|
||||
echo "✅ Backup erstellt in: ${BACKUP_DIR}"
|
||||
echo ""
|
||||
echo "Inhalt:"
|
||||
ls -la "${BACKUP_DIR}/"
|
||||
echo ""
|
||||
echo "🎯 Nächster Schritt: Auskommentierte Routes können jetzt sicher entfernt werden"
|
||||
echo " Rollback möglich mit: cp ${BACKUP_DIR}/app.py.backup_${TIMESTAMP} v2_adminpanel/app.py"
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren