Simple backup solution


/ Published in: Makefile
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ### ###
  2. ## Synchronize arthur with local copy ##
  3. ### ###
  4.  
  5. all:
  6. @echo "Synchronize arthur with backup on sirius"
  7. @echo "Type:"
  8. @echo " make sync - synchronize"
  9. @echo " make put - put the local files to arthur"
  10. @echo " make get - get files from arthur"
  11.  
  12. get:
  13. @echo -e "\033[01;01mGetting data from arthur...\033[01;00m"
  14. @rsync -avuzbP --rsh=ssh --exclude '*~' 192.168.1.6:/home/brcha/ ./
  15. @echo -e "\033[01;01mGetting data from arthur... \033[01;32mdone\033[01;00m"
  16.  
  17. put:
  18. @echo -e "\033[01;01mPutting data to arthur... \033[01;00m"
  19. @rsync -Cavuzb --no-group --rsh=ssh --exclude '*~' ./ 192.168.1.6:/home/brcha/
  20. @echo -e "\033[01;01mPutting data to arthur... \033[01;32mdone\033[01;00m"
  21.  
  22. sync: get put

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.