NorthStar-HMI/utils/download_recordings
2025-08-18 10:30:41 +02:00

23 lines
618 B
Bash

#!/bin/bash
# Configuration
PI_USER="hmi"
PI_HOST="192.168.1.46"
REMOTE_FOLDER="/home/hmi/Desktop/HMI/recordings"
LOCAL_FOLDER="/Users/Etienne/Library/CloudStorage/OneDrive-nehemis/nehemis - 04 Records/HMI_data"
echo "Starting folder download from Raspberry Pi"
# Run scp with sshpass
rsync -avz --progress --ignore-existing\
"$PI_USER@$PI_HOST:$REMOTE_FOLDER" \
"$LOCAL_FOLDER"
# Check if scp succeeded
if [ $? -eq 0 ]; then
echo "✅ Download completed successfully."
echo "📁 Files copied to: $LOCAL_FOLDER"
else
echo "❌ Download failed. Please check the connection or credentials."
fi