Created
July 6, 2013 02:52
-
-
Save electronut/5938436 to your computer and use it in GitHub Desktop.
backup script for Raspberry Pi - tested on OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backup script for Raspberry Pi | |
# | |
# electronut.in | |
# | |
#!/bin/bash | |
echo Backing up RPi \#1... | |
# set this to Raspberry Pi IP address | |
PI_ADDR="192.168.4.31" | |
# set this to Raspberry Pi code directory | |
# note that the trailing / is important with rsync | |
PI_DIR="code/" | |
# set this to local code (backup) directory | |
BKUP_DIR="/Users/mahesh/code/rpi1/" | |
# run rsync | |
# use this first to test: | |
# rsync -uvrn pi@$PI_ADDR:$PI_DIR $BKUP_DIR | |
rsync -uvr pi@$PI_ADDR:$PI_DIR $BKUP_DIR | |
echo ... | |
echo done. | |
# play sound - optional | |
afplay /System/Library/Sounds/Basso.aiff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment