hgj1357
asked on
Robocopy
I am using robocopy to mirror a Windows volume to a Linux volume. I'm having a snag with file attributes.
Here's my script:
ROBOCOPY X:\ \\svr4\V1\004-THURSDAY\X\ /E /R:2 /MIR /NP /XO /NS /NC /NFL /NDL /NJH /XF *.bak *.tmp aquota.user /XD *"lost+found" *"recycler" *"_images" /LOG+:\\svr4\V1\Scripts\Mi rror_Full_ X.LOG
And here's the error:
2012/08/14 10:52:47 ERROR 5 (0x00000005) Changing File Attributes X:\Projects\_FINBLK\
Access is denied.
I don't care about file attributes as I will be the only person with access to the Linux volumes. How do I stop robocopy from trying to transfer attributes?
Here's my script:
ROBOCOPY X:\ \\svr4\V1\004-THURSDAY\X\ /E /R:2 /MIR /NP /XO /NS /NC /NFL /NDL /NJH /XF *.bak *.tmp aquota.user /XD *"lost+found" *"recycler" *"_images" /LOG+:\\svr4\V1\Scripts\Mi
And here's the error:
2012/08/14 10:52:47 ERROR 5 (0x00000005) Changing File Attributes X:\Projects\_FINBLK\
Access is denied.
I don't care about file attributes as I will be the only person with access to the Linux volumes. How do I stop robocopy from trying to transfer attributes?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just a guess: try removing the /MIR switch?
ASKER
I want this to mirror the source volume. Will /copy:dt affect that? removing /MIR probably would affect the mirror operation, yes?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Using /COPY:DT
I am now getting this error
2012/08/14 13:24:11 ERROR 5 (0x00000005) Copying File X:\Projects\_FINBLK\Hydran t.dwg
Access is denied.
Waiting 30 seconds...
X:\ is the source volume
I am now getting this error
2012/08/14 13:24:11 ERROR 5 (0x00000005) Copying File X:\Projects\_FINBLK\Hydran
Access is denied.
Waiting 30 seconds...
X:\ is the source volume
Is that the first file it's trying to copy (or in other words: can you copy any file at all from the source to the target, in Explorer if necessary)?
If it's just single files where this happens, add /r:0 /w:0 to your command line options.
If it's just single files where this happens, add /r:0 /w:0 to your command line options.
ASKER
OK. I see what has happened. Some of the folders in the destination are now owned by ROOT and I can't access them from my user login. Whats the quickest way to change properties for all folders and sub folders to my user name. (Linux question, I guess.)
ASKER
How do I add "LINUX" to the categories that this question posts under?
ASKER
OK. I got the Linux bit;
chgrp -R buggaluggs /V1
chown -R buggaluggs /V1
That'll take an hour or two.
chgrp -R buggaluggs /V1
chown -R buggaluggs /V1
That'll take an hour or two.
ASKER
We have a winner:
COPY/DT
COPY/DT