Created
November 19, 2015 16:47
-
-
Save hackingbutlegal/eef6dcaa6b8e79648a4d to your computer and use it in GitHub Desktop.
Some simple rsync thing
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 | |
# vj_rsync.sh | |
echo "" | |
echo "this script does some rsync thing" | |
echo "" | |
read -p "press [enter] to start" | |
echo "" | |
# hard code the pw between the quotes or fix the script to read input from the command line | |
PASSWORD1="some-pw-here" | |
# other settings you could set here or fix the script to read input from the command line | |
USER1="vj" | |
PORT1="873" | |
HOST1="127.0.0.1" | |
SRCPATH1="some-src-path-here" | |
DSTPATH1="some-dst-path-here" | |
rsync -avcP -e sshpass -p $PASSWORD1 ssh -p $PORT1 --progress $USER1@$HOST1:/$SRCPATH1 /$DSTPATH1 | |
echo "" | |
echo "rsync job completed." | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment