@echo off REM Make environment variable changes local to this batch file SETLOCAL REM Backup Databases sqlcmd -U user -P password -S -H -i REM ** CUSTOMIZE ** Specify where to find rsync and related files (C:\CWRSYNC) SET CWRSYNCHOME=%PROGRAMFILES(x86)%\CWRSYNC REM Set CYGWIN variable to 'nontsec'. That makes sure that permissions REM on your windows machine are not updated as a side effect of cygwin REM operations. SET CYGWIN=nontsec REM Set HOME variable to your windows home directory. That makes sure REM that ssh command creates known_hosts in a directory you have access. SET HOME=%HOMEDRIVE%%HOMEPATH% REM Make cwRsync home as a part of system PATH to find required DLLs SET CWOLDPATH=%PATH% SET PATH=%CWRSYNCHOME%\BIN;%PATH% REM Run cwRsync rsync -xavz "/cygdrive/c/Backup/" --exclude="bin" nas::module/databases ENDLOCAL