robocopy problem

Associate
Joined
19 Aug 2005
Posts
1,562
Location
Beds, UK
Hi guys

I currently use robocopy to backup the files from my NAS to my pc, and also some files from the pc to the NAS.

I have created a batch file, and all is fine.

Now... the issue is that I backup about 1.5tb of hd movies from the NAS to a usb hdd connected to my pc. Not a problem normally, because robocopy only copies what is new.

Now, I rebuilt the drive the NAS and copied it all back from the external USB HDD to the nas, and now when I run robocopy, it wants to copy all the files back again, because the files on the NAS are now newer!

So... they question, is there a way to use robocopy so that it ignores which file is newer?

or is there an easy way to change the "created" date of a whole load of movie files?

thanks guys.
 
You could use Robocopy with the /MAXAGE:n switch, where n is a date (in the format YYYYMMDD) slightly later than the date stamp of the (current) newest file on the NAS - that way, anything added or modified prior to that date would be ignored, but files added afterwards would be copied, so you'd still have your incremental backups.

It's probably easier long-term though to reset all the file date/time stamps on the NAS so that they're older than the USB drive (or you could do it the other way and reset the date/time stamps on the USB drive so that they're newer than the NAS). If you google for "touch utility" you'll get plenty of options - this one for example should do what you want.
 
I was going to mention that, but I wasn't sure it was the cause of the problem in this case and I didn't want to confuse the issue. The OP mentioned that his incremental copies were working OK before he did the bulk restore to the NAS - I think that the difference in timestamp granularity tends to cause problems when you're backing up *from* an NTFS volume *to* a Linux filesystem (presumably because of the way the timestamps are rounded), whereas the OP normally seems to do it the other way around.

But yes, it probably won't hurt to use the /FFT switch whenever you're using Robocopy to do incremental copies between NTFS filesystems and something else.
 
Back
Top Bottom