From Windows 2008 to Windows 2012 the robocopy utility has been changed. Now it detects all files an “modified”.
I use robocopy to bring data from remote office to the centralized file server and back them up further. I’m not sure if robocopy actually copies files or just changes some attributes, but NetBackup sees the files as new and back up all of them even during incremental backup.
After battling the issue on my own I have opened a case with Microsoft. Together with MS engineer we have found two potential solutions
First of all, this is the command I run to copy data:
Robocopy “D:\Shares” “Z:\Shares” *.* /mir /e /copy:DATS /zb /mt:20 /w:2 /r:2
and it gives me all the files marked as “modified”
However, this command with /copy:DAT instead of /copy:DATS
Robocopy “D:\Shares” “Z:\Shares” *.* /mir /e /copy:DAT /zb /mt:20 /w:2 /r:2
works just fine. So the issue is within security attributes. The command with /copy:DAT can be used during the week, and the command with /copy:DATS can be used over the weekend. Kind of not the best solution, but works.
However, this command does everything at once
Robocopy “D:\Shares” “Z:\Shares” *.* /mir /m /e /copy:DATS /zb /mt:20 /w:2 /r:2
Add /m switch to copy only files for which the Archive attribute is set, and to reset the Archive attribute after.
When I ran it the first time, it still showed all the files as “modified”, but reset the attribute. Then the second run gave me a clean shot.