Last active
May 25, 2016 15:19
-
-
Save evandonovan/699fcfb91c950a14debf48fb0193c63a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/expect -f | |
# exp_internal 1 ;# uncomment to turn on expect debugging | |
set timeout -1 | |
USER="user" | |
HOST="127.0.0.1" | |
SRC="/src/dir/here" | |
DST="/dst/dir/here" | |
# creates an rsync process that will rsync with excluded directories | |
# goes to source and destination | |
spawn rsync -e "ssh -p 22" -aPH --exclude='/moodledata' --exclude='/backup' $USER@$HOST:$SRC $DST | |
expect "password:" | |
send "password\r" | |
expect eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment