Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- APP_HOME=$( cd ${0%/*} && pwd -P )"/.."
- REMOTE_SHARED="railsapp@host.domain.net:~/www/railsapp/shared"
- SPEED_LIMIT=""
- # Un-comment this line if you want to limit the download speed to un-clog your connexion
- # SPEED_LIMIT="--bwlimit=500"
- # -l forces copy of symlinks
- #
- # Other filters in exclude_assets to avoid getting large images
- # **.[pP][dD][fF]
- # **original**
- # Make sure you are using a recent rsync version (3+) for the progress2 info
- ARGS="--delete -lPrt --safe-links --exclude-from=$APP_HOME/script/exclude_assets --human-readable --progress --info=progress2 $SPEED_LIMIT"
- rsync $ARGS $REMOTE_SHARED/public/attachments/ $APP_HOME/public/attachments/
- rsync $ARGS $REMOTE_SHARED/private/ $APP_HOME/private/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement