Created
December 8, 2016 22:31
-
-
Save lightszentip/9558283d339c4cb19d5b691fae0e060a to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# | |
##### Backup Script for my local Filesystem | |
##### run only if I have connection with my secure home wlan | |
# Get the wlan essid | |
essid=$(iwgetid -r) | |
echo $essid; | |
# check the name, exit otherwise | |
if [ "$essid" = "nameofmywlan" ] | |
then | |
echo "True, we are connected to the right wlan" | |
# TODO Check if nas server is exist | |
rsync -aPuvb --modify-window=1 --exclude ".@__thumb" --delete --backup-dir '../dirforbackup' --stats --password-file=filewithpasswordandpath /pathtodir/ rsyncusername@serverip::sharedfolder/pathtomydironnas | |
else | |
echo "Wrong WLAN" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment