Added bash file for transfer of recordings
This commit is contained in:
parent
16b89bc47d
commit
481a19a17a
|
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
PI_USER="pi"
|
PI_USER="hmi"
|
||||||
PI_HOST="192.168.1.42"
|
PI_HOST="192.168.1.46"
|
||||||
REMOTE_FOLDER="/home/pi/data_logs/"
|
REMOTE_FOLDER="/home/hmi/Desktop/HMI/recordings"
|
||||||
LOCAL_FOLDER="/recordings"
|
LOCAL_FOLDER="/recordings"
|
||||||
|
|
||||||
|
# Prompt for password silently
|
||||||
|
read -s -p "Enter SSH password for $PI_USER@$PI_HOST: " PASSWORD
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Sync folder from Raspberry Pi to local
|
# Run rsync with password
|
||||||
rsync -avz --progress "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER"
|
sshpass -p "$PASSWORD" scp -r "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER"
|
||||||
Loading…
Reference in New Issue
Block a user