Return to Snippet

Revision: 21175
at August 18, 2011 09:16 by wnasich


Updated Code
#!/bin/bash
REMOTE_FOLDER="/path/to/remote/folder/"
LOCAL_FOLDER="/path/to/local/folder/"
SSH_USER="user"
SSH_HOST="remote-host"

DRY="--dry-run"
if [ "$1" == 'write' ]; then
  DRY=" " 
fi
echo $DRY

rsync $DRY -av -e ssh --exclude "CVS" --exclude ".svn" [email protected]$SSH_HOST:$REMOTE_FOLDER $LOCAL_FOLDER

Revision: 21174
at December 5, 2009 18:18 by wnasich


Initial Code
#!/bin/bash
REMOTE_FOLDER="/path/to/remote/folder/"
LOCAL_FOLDER="/path/to/local/folder/"
SSH_USER="user"
SSH_HOST="pass"

DRY="--dry-run"
if [ "$1" == 'write' ]; then
  DRY=" " 
fi
echo $DRY

rsync $DRY -av -e ssh --exclude "CVS" --exclude ".svn" [email protected]$SSH_HOST:$REMOTE_FOLDER $LOCAL_FOLDER

Initial URL


Initial Description
Syncronize a local folder with a remote folder.

Initial Title
Sync two folders with rsync

Initial Tags


Initial Language
Bash