#!/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."