rsync from Linux to a Windows partition, ext3 to NTFS

Just figured out a solid way to use rsync to efficiently sync data from a Linux host (ext2, ext3 or ext4) to a Windows-based NTFS filesystem.

rsync -rltDvu --modify-window=--progress --delete /mnt/sata /media/windows

/mnt/sata here is the Linux directory to be backed up, and /media/windows is the NTFS-formatted Windows destination.

The crucial part is “—modify-window=1”. Because Windows and Linux use slightly different formats for file creation/modification timestamps, a regular rsync operation won’t recognize identical files between ext3 and NTFS filesystems. The “—modify-window=1” option tells rsync to allow for a 1 second difference in timestamps between files; once rsync knows to be slightly less literal in its definitions of “same”, it works quite well.

Hope someone finds this useful. I’m using it to make a backup copy of my MythBuntu media (ripped movies and music) to an external hard drive (formatted with NTFS instead of ext3 or 4 so I can easily share it with friends).


Posted on Sep 05, 2010 - 08:34 PM

Comments:

This option just saved my system a lot of duplicated work.  Previously, when backing up data from an ext3 partition to an external NTFS partition, rsync would recopy all the files every time.  Thank you!

By .(JavaScript must be enabled to view this email address) on Dec 04, 2010 - 05:32 PM


Comments:

Hello there,

I’ve landed here while googling around for a solution. I just don’t seem to be able to preserve the creation date of my files when running the first backup hence defeating the whole incremental thing.

I would be grateful if you could just have a look at this thread http://forum.qnap.com/viewtopic.php?f=15&t=37728

I’ve tried it even adding that window option (rsync -rlptgoD -vh—delete -i—backup—modify-window=1 ) and I get the same results.

Thanks a lot in advance,

Marc

By .(JavaScript must be enabled to view this email address) on Dec 23, 2010 - 04:57 AM


Comments:

You’re a lifesaver!  This is just what I needed to get my NSLU2 (unslung) backup working. :-)  I’ve got an NTFS formatted drive on one port, and needed to create a nightly backup of all my media onto the ext3 formatted Drive running Unslung firmware…This works a treat now, thanks!!

By .(JavaScript must be enabled to view this email address) on Feb 26, 2011 - 09:53 AM


Leave A Comment!!

Please enter the letters or word you see in the image below:

Name:

Email:

Location:

URL:

Remember this information for next time

E-mail me about follow-up comments