• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1481
  • Last Modified:

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\Mirror_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?
0
hgj1357
Asked:
hgj1357
  • 6
  • 3
2 Solutions
 
oBdACommented:
Add "/COPY:DT" to your command line to exclude attributes; default is "COPY:DAT" (Data, Attributes, Time stamp.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Just a guess: try removing the /MIR switch?
0
 
hgj1357Author Commented:
I want this to mirror the source volume.  Will /copy:dt  affect that?  removing /MIR probably would affect the mirror operation, yes?
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
oBdACommented:
/COPY:DT will not change the mirroring function, it will just exclude attributes from being copied over.
Removing /MIR would still use the default of "/COPY:DAT".
0
 
hgj1357Author Commented:
Using /COPY:DT

I am now getting this error

2012/08/14 13:24:11 ERROR 5 (0x00000005) Copying File X:\Projects\_FINBLK\Hydrant.dwg
Access is denied.
Waiting 30 seconds...

X:\ is the source volume
0
 
oBdACommented:
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.
0
 
hgj1357Author Commented:
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.)
0
 
hgj1357Author Commented:
How do I add "LINUX" to the categories that this question posts under?
0
 
hgj1357Author Commented:
OK. I got the Linux bit;

chgrp -R buggaluggs /V1
chown -R buggaluggs /V1

That'll take an hour or two.
0
 
hgj1357Author Commented:
We have a winner:

COPY/DT
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now