25 lines
776 B
Bash
25 lines
776 B
Bash
#!/bin/bash
|
|
# Server Restoration Script for Syria Landmarks
|
|
# To be run on the server terminal
|
|
|
|
set -e
|
|
|
|
APP_DIR="/home/hamzadoctor/app"
|
|
EXPORT_FILE="infrastructure/docker/postgis/syria_export.sql"
|
|
|
|
echo "🔄 Restoring Syria landmarks to production database..."
|
|
|
|
# 1. Clean existing manual imports to avoid PK conflicts
|
|
echo "🧹 Clearing existing manual entries..."
|
|
docker exec -i map-db psql -U mapuser -d mapdb -c "DELETE FROM places_syria WHERE source = 'manual_import_2026_04';"
|
|
|
|
# 2. Inject the SQL dump
|
|
echo "📥 Injecting SQL dump..."
|
|
docker exec -i map-db psql -U mapuser -d mapdb < "$APP_DIR/$EXPORT_FILE"
|
|
|
|
# 3. Refresh API cache
|
|
echo "🧹 Flushing Redis..."
|
|
docker exec -i map-redis redis-cli flushall
|
|
|
|
echo "✅ Restoration complete! Syria landmarks are live."
|