Advertisement
Guest User

Untitled

a guest
May 25th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/expect -f
  2. # exp_internal 1 ;# uncomment to turn on expect debugging
  3. set timeout -1
  4.  
  5. USER="user"
  6. HOST="127.0.0.1"
  7. SRC="/src/dir/here"
  8. DST="/dst/dir/here"
  9.  
  10. # creates an rsync process that will rsync with excluded directories
  11. # goes to source and destination
  12. spawn rsync -e "ssh -p 22" -aPH --exclude='/moodledata' --exclude='/backup' $USER@$HOST:$SRC $DST
  13. expect "password:"
  14. send "password\r"
  15. expect eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement