21 lines
866 B
Bash
Executable File
21 lines
866 B
Bash
Executable File
#!/bin/bash
|
|
# Download Existing Syria Data from Server to Mac
|
|
# To be run on the Mac terminal
|
|
|
|
SERVER_IP="188.68.36.205"
|
|
SERVER_USER="hamzadoctor"
|
|
REMOTE_PATH="/home/hamzadoctor/app"
|
|
KEY_PATH="/Users/hamzaaleghwairyeen/.ssh/doctory-key"
|
|
|
|
echo "🌍 Connecting to server to dump existing Syria landmarks..."
|
|
|
|
# 1. Generate dump on server
|
|
ssh -i "$KEY_PATH" "$SERVER_USER@$SERVER_IP" "docker exec -t map-db pg_dump -U mapuser -d mapdb -t places_syria --data-only --inserts > $REMOTE_PATH/existing_syria_data.sql"
|
|
|
|
# 2. Download the dump to local Mac
|
|
echo "📥 Downloading dump to Mac..."
|
|
rsync -avz -e "ssh -i $KEY_PATH" "$SERVER_USER@$SERVER_IP:$REMOTE_PATH/existing_syria_data.sql" infrastructure/docker/postgis/
|
|
|
|
echo "✅ Download complete: infrastructure/docker/postgis/existing_syria_data.sql"
|
|
echo "Now run ./infrastructure/scripts/local_db_prep.sh to merge."
|