Skip to content

Managing and updating remote servers

ygaras edited this page Oct 9, 2012 · 2 revisions

rsync is a great utility ! A version of rsync, cwRsync is available for Windows:

Before updating a remote server installation from your working copy, make sure there are no differences from what is in your local copy and the remote master repository. You better also create a batch file with the command to make the process of update easier, for example, hawks_local2remote.bat. An example batch file is available after you install cwRsync. Make copy of it and change the last line with the following line.

rsync -rltv  --exclude='.git' --exclude='local.js' --delete  --exclude='node_modules/' \
    --exclude='build/' /cygdrive/e/www/dev/hawks/ root@hawks.hub43.com:/var/www/hawks/

Do not forget to change the paths to reflect what you are using.

After installing cwRsync, you also get a command line utility ssh to log to remote servers. So if you are using forever to run your nodejs application. You can create another batch file to restart forever:

ssh root@hawks.hub43.com "forever restartall"

Clone this wiki locally