rsync
installedrsh
option running app's name as the remote host name:
# list files in app directory
rsync --rsh="<./cf-rsh-linux.sh or ./cf-rsh-windows.sh>" <your app name>:app/
RSYNC_RSH
environment variableexport RSYNC_RSH=<$PWD/cf-rsh-linux.sh or $PWD/cf-rsh-windows.sh>
rsync
## Examples
### Linux - modify existing app (ruby/nodejs/python)
1. Push functioning original app but override healthcheck
```sh
cf push my-rsync-app -p my-original-app/ -u none
Make changes to local my-original-app
directory
Use rsync to upload and overwrite app directory in CF instance
rsync --rsh="./cf-rsh-linux.sh" --resursive --verbose --delete my-original-app/ my-rsync-app:app
Visit the app URL in browser and see the updated content
Push functioning original app
cf push my-rsync-app -p my-original-app/ -s windows2016 -b hwc_buildpack
Make changes to local my-original-app
directory (or rebuild/republish from Visual Studio to app directory)
Use rsync to copy app directory to CF instance
rsync --rsh="./cf-rsh-windows.sh" --recursive --verbose --delete --exclude="hwc.exe" my-original-app/ my-rsync-app:app
/
after the source directory path (my-original-app/
) to copy just its contentsVisit the app URL in browser and see the updated content
cf restart/push/scale
will discard all rsync
changes and restore the app state to the original cf push
state.rsync
binary so the cf-rsh
script will download and extract a binary from the msys2 repo to c:\Users\vcap\deps\cf-rsync\
on first connection and re-use it.