I want to backup a folder to a share on a linux nas with robocopy.
I use the commandline robocopy /mir <source> <dest>
After a succesfull copy in explorer the timestamps are equal but somehow robocopy copies the same file the next time it runs and claims source file is newer. Seems to be a problem with the smb version on the nas.
Now I can use /xn
switch to prevent the file copy but that will also prevent the file from being copied the next time I run the same job.
So my question is: How do I use robocopy to ignore the timestamp but only copy a file if the file size changed (I know this would not be a 100% solution) but since I want to backup office documents and pictures, this would be OK for me.
XCOPY
andRobocopy
. You are better to get the HASH of the file and then compare them but this isn't do-able in robocopy. Since robocopy isn't the right tool (IMO), why not use other software? What actually is the issue? If you're only copying office documents and pictures, I assume the time it takes isn't really a problem?