Skip to content

Instantly share code, notes, and snippets.

@hackingbutlegal
Created November 19, 2015 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hackingbutlegal/eef6dcaa6b8e79648a4d to your computer and use it in GitHub Desktop.
Save hackingbutlegal/eef6dcaa6b8e79648a4d to your computer and use it in GitHub Desktop.
Some simple rsync thing
#!/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