I am attempting to back up data onto some external hard drives as a part of my job, the data sets can be over 100GB in size with specific file structure so using robocopy is a must.
When I run this command where G:\ is an external hard drive or even usb stick and [source] is an internal drive,
robocopy [source] G:\ /E
I get the error
G:\System Volume Information\2018\01/11 15:36:59 ERROR 5 (0x00000005) Changing file attributes G:/
Access is denied
Waiting 30 seconds...
This error also occurs when copying from an external drive to a different external drive.
I have a feeling this has to do with setting permissions, but I am not sure.
Any ideas?
Are you sure you need to copy the \System Volume Information
folder? Generally you can exclude that. It doesn't directly have any of you data. Also, if the destination is also an NTFS volume it will already have a \System Volume Information
folder that it might not be a good idea to over-write.
Also, you might want to include the /b
(backup) , and/or /zb
(backup+restarable) options when using robocopy for backups. Assuming you have administrator privileges on the system this will allow you to bypass a lot of the standard access controls on a system.
One other suggestion. If you really need to make a copy of the entire filesystem/volume you might want to look at using something like disk2vhd instead of robocopy.
User contributions licensed under CC BY-SA 3.0