How to use rsync for backing up Windows

I use Cwrsync for Windows. You can use cygwin‘s rsync too.

Here’s the actual one-liner I use:

.\bin\rsync -vah --progress --exclude '/$RECYCLE.BIN' --exclude '/System Volume Information' /cygdrive/d/* /cygdrive/g/TM_PROD-VDI_BACKUP

-v — verbose

-a — archive

-h — human readable

I also got 2 --exclude‘s in there so I won’t be copying the Recycle Bin and System Restore folder.

Then the source and destination drives.

You might notice the cygwin-type paths. That’s because Cwrsync is a small cygwin package with only rsync included.

Portability? I installed it and I just copied the Cwrsync folder from Program Files into my portable drive and use that. So far it seems to work fine.

rsync windows

rsync windows

On first run it seems it’s getting errors copying Outlook PST files that are open in Outlook. I’ll check if I can make this copy even if a file is open by another process. For now it’s just the initial backup script and seems to be working.

Will work on the incremental backup script next after the full backup is finished (it’s still running as I type this) and update this post.

 

 

This entry was posted in HowTo, Unix One-Liners. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Connect with Facebook

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>