Want to backup files in windows the linux way?

Download this cwRsync.

Which is rsync packaged up for windows, and create a small script like this to run as administrator:


@ECHO OFF

SETLOCAL

REM ** CUSTOMIZE ** Specify where to find rsync and related files (C:\CWRSYNC)
SET CWRSYNCHOME="c:\Program Files (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%

sc stop MsMpSvc
taskkill /f /im msmpeng.exe
rsync --delete -rvP /cygdrive/d/games/steam /cygdrive/f/games
sc start MsMpSvc

Adjust your rsync line as you need to, also note that you don’t need to stop microsoft security essentials but it will slow everything down whilst you’re creating/writing so many files. Of course, if you don’t use it that’s cool but you might want to temporarily shut down whatever tool you do use.

This entry was posted in Programming and tagged , , , , . Bookmark the permalink.