[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5563
  • Last Modified:

Copy the NTFS permissions with robocopy


How can I copy the NTFS permissions with robocopy. I am using the command robocopy /source /dest /SEC /Mir. When I run this command it does copy the permissins just the 1st time the subsequent permissions are not copied. I even tried robocopy /source /dest /COPYALL /Mir with no luck
0
life_j
Asked:
life_j
  • 11
  • 7
  • 4
  • +2
1 Solution
 
Steve KnightIT ConsultancyCommented:
There is a /SECFIX option which sounds like it does this

Steve
0
 
Steve KnightIT ConsultancyCommented:
Here you go, checked the help:

http://www.ss64.com/nt/robocopyNT.html
/SECFIX : FIX SECurity info on existing files and dirs.##

So I'd try using /SEC and /SECFIX too.

hth

Steve
0
 
haim96Commented:
if you have large amount of files i would consider to use NTbackup
to backup the files and restore them in new location with all folder and permission structure.
it's easy and more safe then just copy.
just backup to file , move the file to new location, restore.
( you have log on faild files because of access denied for example)

but that just me...
:)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Steve KnightIT ConsultancyCommented:
I tend to disagree.  Robocopy works well, fast, reliable and gives very detailed error messages that can be used to identify what goes on.  NT backup isn't bad but you need twice the disc space somewhere -- e.g. to copy 50Gb you need original 50Gb, 'spare' 50Gb plus final 50Gb to restore to!
0
 
haim96Commented:
you mybe right when you backup to file.
most of the time i prefer to move large amount of data with this method by using tape device
instide of move large data across network...
the "backup to file " is just improvisation in case you don't have tape device.
0
 
Steve KnightIT ConsultancyCommented:
True.  If you have arcserve or veritas then you can normally do backup and restore in one as a copy type job but lets get back to the q I guess!
0
 
haim96Commented:
it's looks kind of solved... now the author need to reply.

cheers.
0
 
life_jAuthor Commented:
dragon-it

I already tried with /SEC but wouldn't work. /SECFIX has been removed from the new version of Robocopy
http://www.ss64.com/nt/robocopyNT.html
0
 
haim96Commented:
what about:

/SEC : copy SECurity info (both source and dest must be NTFS).##
0
 
haim96Commented:
are both source and dest NTFS?
0
 
Steve KnightIT ConsultancyCommented:
That is what he was using already in the Q.  Why not just use the old version of robocopy with /secfix, sorry, didn't know that had been removed from XP version..  How much data changes here, maybe your onyl option is to use /IS presumably together with /SEC or /COPYALL which includes /SEC as fasr as I can see.

"Using the /IS switch alone, with no other switches, forces a total refresh of the destination tree."

I like ROBOCOPY but the one thing I do find is that so many options do pretty well the same as others...

Otherwise perhaps you could combine it with an XCOPY! i.e.

xcopy /t /o source dest

to create directory structure but not files and copy ownership and ACL.

Sorry I have no straight answer, a lot of it depends on how much you are copying ,how much changes all the time, can both sides change, etc.

Steve
0
 
life_jAuthor Commented:
I need to copy about 6 GB of data.
Does Xcopy copies the NTFS permissions.
0
 
Steve KnightIT ConsultancyCommented:
Yes it does when you use the /o switch
0
 
haim96Commented:
6GB ??
are you sure you don't want to use backup and restore method?
0
 
Steve KnightIT ConsultancyCommented:
Well at 50Mb/sec say for gigabit ethernet it;s only 2 minutes copying...
0
 
haim96Commented:
so you deside he have gigabit ethernet ?
OK...

:)
0
 
Steve KnightIT ConsultancyCommented:
Well I presume he is aware of backups with NT backup, Veritas etc.. he was asking for how to do it with robocopy or xcopy..... now if he has 10meg hubs I would be a bit worried at copying this much but otherwise not so bad, especially if it is scheduled out of hours ;-)  In any case Robocopy with /MIR or xcopy with /D copies only newer files anyway which might not be the whole 6Gb.
0
 
life_jAuthor Commented:
Its over the WAN,so might be good idea to do a Windows NT backup. and Restore over it.
But I don't want to use backup utility because I need to update the files every day.WHich can run through robocopy script.

I tried Xcopy but doesn't copy the permissions.
0
 
Steve KnightIT ConsultancyCommented:
Then your easiest bet would be to get the older version of robocopy I guess, at least to try.

Over a WAN puts a different spin on it, it always helps to have the facts :-)

I don't suppose you could stick a 2003 R2 server both ends (replicated file areas are much better in R2)
0
 
life_jAuthor Commented:
Resolved the issue

Robocopy copies the security and NTFS permissions if you are dooing the robocopy for the 1st time. I mean to say that if the destination is empy.But  in case you already have data in the destination then the robocopy wouldn't copy the permissions.

To copy the permissions what I did was ran robocopy /mir /create /copyall to copy the files and with zero size on to a temporary folder .From the temporary folder I again ran a robocopy job as robocopy /sec to the actaul destination directory which copied the file permissions.
0
 
Steve KnightIT ConsultancyCommented:
Interesting... and it did that without overwriting the files I suppose because each was seen as new which is why it copies them but you didn't tell it to copy files just securities.  Nice.

Steve
0
 
Steve KnightIT ConsultancyCommented:
Well as an expert yourself you know it is annoying to waste your time on a question for nothing but if that is your choice fine.

Steve
0
 
kodiakbearCommented:
Closed, 250 points refunded.
kb
Experts Exchange Moderator
0
 
R2DSCommented:
This may have been answered but I need some help. I am trying to copy the permissions only ffrom 2003 to 2008 R2 file servers but when i runt he command it does not work i get nothng and no security changes that I expect.

syntax used: ROBOCOPY \\2003FS01\APPS \\S008R2\APPS /COPY:SOU /IS /XC /XN /XO /XL
 I get back 25 directories, 25 skipped... No pernmissions copied.. Please help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 11
  • 7
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now