Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement