Advertisement
Guest User

Untitled

a guest
Feb 18th, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. MY_DIR="`readlink -f "$0" | sed 's!/[^/]*$!!'`"
  4. REMOTE_ADDRESS=10.8.0.5
  5. REMOTE_MODULE="backup-module-`hostname`"
  6. REMOTE_PASSWORD=password1
  7. REMOTE_USER=backup-user1
  8. LOCAL_DIR=/
  9.  
  10. RSYNC_PASSWORD=$REMOTE_PASSWORD \
  11. rsync \
  12. -aAHXv \
  13. --bwlimit=20m \
  14. --delete \
  15. --delete-excluded \
  16. --exclude-from="$MY_DIR/exclude.list" \
  17. --human-readable \
  18. --progress \
  19. "$LOCAL_DIR" \
  20. "rsync://${REMOTE_USER}@${REMOTE_ADDRESS}/${REMOTE_MODULE}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement