0

I am using rsync via cygwin to create incremental backups from a Windows 8.1 machine. It worked perfect for over a year. But a few weeks ago it started to re-copy existing files (and these files have a wrong modification date on the backup disc.)

The files that are re-copied are always executables: exe, bat, js, vbs, dll

The command line is the following:

rsync.exe "-rltv" "--progress" "--hard-links" "--delete" "--ignore-errors" "--force" "--link-dest=../../2016.07.04_09.52.23/?????" "/cygdrive/G/?????/" "/cygdrive/W/?????/2016.08.15_13.18.49/?????"

I tried disabling my anti-virus protection, but no luck.

What is causing this problem? Why is the modification date suddenly wrong transferred? And why for executables only?

Lately I found out the issue I have has someone else too, except he is using a different application: http://www.2brightsparks.com/bb/viewtopic.php?t=11567 Seems like a Windows copy-file issue...?

Aravor
  • 371
  • 3
  • 6

2 Answers2

1

What's this about wrong modification date on the backup disk? Rsync uses the modification time (and size) to determine if it should skip files. If there's something funky going on with that data, it may explain why you're having trouble.

Give this a try. You can append the --checksum argument to have rsync skip files based on checksums instead of modification time and size.

man rsync

    -c, --checksum              skip based on checksum, not mod-time & size
Ryan Babchishin
  • 6,260
  • 2
  • 17
  • 37
  • Thanks for your answer. You could solve it that way. But with thousands of files, many of them large, this operation would take days. – Aravor Aug 22 '16 at 06:42
  • 1
    @Aravor You didn't answer my question. What's wrong with the mod time on disk? And why do you think checksums are so slow? And why do you think you have a choice? – Ryan Babchishin Aug 22 '16 at 14:33
  • @Aravor I just ran a test on my network using 98 files totalling 10.14GB. `rsync --checksum` was 50% faster than default. I have no idea why, but I think it's worth a try. – Ryan Babchishin Aug 22 '16 at 18:00
  • Well, using `--checksum` ist much faster than I had think. Never the less it solves my problem just to 90%. There are still files which are re-copied although they are not different. A few .dlls, a few .exe and many .js files. Why is that? The files that are re-cpoied have the modification date of the time they where copied. – Aravor Sep 01 '16 at 05:54
0

Try using rsync with:

rsync --modify-window=2
slass100
  • 111
  • 1
  • 1
    This needs more explanation. – Sven Sep 27 '16 at 21:07
  • I'm not sure why the windows version of rsync handles timestamps differently. Others have found it too, [link](http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html#gotchas) – slass100 Sep 28 '16 at 12:31
  • I tried that. But the recopied files have the copy-date as modification date, which sometimes differs years with the original modification date. Lately I found out the issue I have has someone else too, except he is using a different application: http://www.2brightsparks.com/bb/viewtopic.php?t=11567 – Aravor Sep 29 '16 at 08:19