robocopy [source folder] [target folder] /MIR
The MIR option will create the target folder as a mirror of the source folder. The command above works pretty well when both source and target folder are NTFS file systems.
When I changed the target folder to my DNS-323 network storage, which uses a Linux file system (ext2/ext3), I started getting the following errors with the command above:
- Although some files are virtually identical in both content and timestamp, robocopy still thinks they are different and show them as "Newer". So, whenever you run the command above, robocopy will always copy these files even if they did not change (not good for incremental backups!).
- "ERROR 5 (0x00000005) Changing File Attributes ... Access is denied".
For the second error (ERROR 5), you need to turn off the attribute copying. Robocopy uses the /COPY:DAT by default, which means to copy data, attributes and timestamp. You should turn off attribute copying by explicit setting /COPY:DT.
So, the command to backup from a NTFS partition to a ext2/ext3 partition should be:
robocopy [source folder] [target folder] /MIR /COPY:DT /FFT
45 comments:
Thanks for this. I've been messing around with archive bits for ages!
Thanks, this was bugging me for days
Thanks .. I've got a DNS-323 with the exact same issue, and I couldn't understand what was going on.
Thank you - now my Mirror from NTFS to FAT32 works ...
Thanks for your efforts. Saved by bacon!
Found this because of the access denied problem but also fixed the FFT flag issue - this was a 2 for 1! Thanks!
Thanks heaps...Great post.
Where would we be without articles like this.
Job well done.
Excellent post - I would mot have known where to start looking (NTFS to EXT2). Paul
Thanks I wondered what those errors were!!
Thanks a lot! :) I was going nuts trying to figure out why I could not copy files.
It was very helpfull, thanks!
Thanks a million for this! Now I can simply patch the wall from all my head pounding against it and be happy! Cheers!
Very helpful tips. had the script going in minutes. thanks much !!
Thanks a lot, saved a lot of headaches and eventually a lot of time as well!
Thanks! It solved my problem when copy from NTFS to FAT32 external HD.
Gracias carnal. De todas las 'soluciones' que encontré, esta era la única que funcionó. -- El Guero.
Stumbled on your page from a google search. Robocopy to a Buffalo NAS drive kept giving the errors mentioned. Flies through now!
Cheers!
Thanks heaps. I've also got a DNS-323 with the same issue.
Luis, You DA Man! Solved problems I've been tinkering with all day.
I must echo what others have said. The Attributes think was KILLING ME until I read this. So simple, and yet...
Thank you so MUCH!!!
The issue almost make me crazy,
finally I know how to fix it and it's such easy way...
CANNOT thank you enough!
That totally worked and just saved me another 2 days of troubleshooting. Thank you!
THANK YOU!!!!
Thank you very much !!!
Thanks Luis. I've been racking my brain with this problem for a while now. I really appreciate your taking the time to write this out so we all benefit.
Nice, I've had this problem for 1.5 years with my DNS-321. Y0U R0CK!
Thanks for this solution. I have been using a QNAP NAS and have been getting this error frequently for over the past year. This seems to have fixed. it!!!
Luis, thanks for posting this. I recently lost access to my Seagate GOFLEX Home NAS device.
I've spent all weekend trying various xcopy & robocopy combinations to get writing again.
Thanks a bunch!
Great tips, I had the exact same issue. Thanks!
Thanks. Helped me with a similar problem (Error 32).
Love your work :))) made my day
Thank you!
I had this problem trying to backup files previously copied from a unix server.
Thanks from me too, couldn't understand why I was getting "access denied" errors.
Great Post. Helped a lot, been scratching my head for days!
Cheers
Thanks - you just saved me some grief figuring this out.
Merci man
Legend, works perfectly
Hi - Cannot thank you enough for this, much appreciated
Thank you! Problem started to occur after I upgraded my firmware NAS and this fixed it.
worked! Thanks so much posting this!
cheers bro!! :D
Thanks man! you are wonderfull
Thank you for pointing out the attribute fix. I had the problem with NAS but not USB drives.
Second error can be eleviated by making the account a Backup Operator on the destination server if it is a Windows machine.
Post a Comment