Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. APP_HOME=$( cd ${0%/*} && pwd -P )"/.."
  4. REMOTE_SHARED="railsapp@host.domain.net:~/www/railsapp/shared"
  5. SPEED_LIMIT=""
  6. # Un-comment this line if you want to limit the download speed to un-clog your connexion
  7. # SPEED_LIMIT="--bwlimit=500"
  8.  
  9. # -l forces copy of symlinks
  10. #
  11. # Other filters in exclude_assets to avoid getting large images
  12. # **.[pP][dD][fF]
  13. # **original**
  14.  
  15. # Make sure you are using a recent rsync version (3+) for the progress2 info
  16. ARGS="--delete -lPrt --safe-links --exclude-from=$APP_HOME/script/exclude_assets --human-readable --progress --info=progress2 $SPEED_LIMIT"
  17.  
  18. rsync $ARGS $REMOTE_SHARED/public/attachments/ $APP_HOME/public/attachments/
  19. rsync $ARGS $REMOTE_SHARED/private/ $APP_HOME/private/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement