Advertisement
Guest User

rsync update

a guest
Feb 22nd, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.54 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. rm -rf /bleeds/l4d2/game/left4dead2/downloads/*
  4.  
  5. Excludes="--exclude game/left4dead2/addons/sourcemod/logs \
  6. --exclude game/left4dead2/cfg/server.cfg \
  7. --exclude game/left4dead2/addons/sourcemod/data/AutoSetup \
  8. --exclude game/steam_appid.txt \
  9. --exclude rsync.sh \
  10. --exclude readme \
  11. --exclude start-l4d2.sh \
  12. --exclude iptables.sh \
  13. --exclude webbackup \
  14. --exclude mysqlbackups \
  15. --exclude game/left4dead2/addons/sourcemod/scripting \
  16. --exclude /bleeds/l4d2/game/left4dead2/addons/sourcemod/configs/sourcebans/sourcebans.cfg \
  17. --exclude game/left4dead2/addons/sourcemod/configs/admins_simple.ini"
  18.  
  19. clear
  20.  
  21. echo -e "New Jersey DRY RUN rsync...\n\n"
  22.  
  23. sshpass -p 'mypassword' rsync -avhiPn --delete $Excludes -e ssh /bleeds/l4d2/ root@45.63.15.19:/bleeds/l4d2/
  24.  
  25. while true; do
  26. read -p "Proceed with the changes? (y/n)    " yn
  27. case $yn in
  28. [Yy]* ) echo -e "\n\n";
  29. break;;
  30. [Nn]* ) exit;;
  31. * ) echo "Ugh!";;
  32. esac
  33. done
  34.  
  35. echo -e "New Jersey rsync...\n\n"
  36.  
  37. sshpass -p 'mypassword' rsync -avhiP --delete $Excludes -e ssh /bleeds/l4d2/ root@45.63.15.19:/bleeds/l4d2/
  38.  
  39. clear
  40.  
  41. echo -e "Dallas DRY RUN rsync...\n\n"
  42.  
  43. sshpass -p 'mypassword' rsync -avhiPn --delete $Excludes -e ssh /bleeds/l4d2/ root@144.202.76.31:/bleeds/l4d2/
  44.  
  45. while true; do
  46. read -p "Proceed with the changes? (y/n)    " yn
  47. case $yn in
  48. [Yy]* ) echo -e "\n\n";
  49. break;;
  50. [Nn]* ) exit;;
  51. * ) echo "Ugh!";;
  52. esac
  53. done
  54.  
  55. echo -e "Dallas rsync...\n\n"
  56.  
  57. sshpass -p 'mypassword' rsync -avhiP --delete $Excludes -e ssh /bleeds/l4d2/ root@144.202.76.31:/bleeds/l4d2/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement