Solved

Copy the NTFS permissions with robocopy

Posted on 2006-10-29
25
4,840 Views
Last Modified: 2011-09-20

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
Comment
Question by:life_j
  • 11
  • 7
  • 4
  • +2
25 Comments
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17832589
There is a /SECFIX option which sounds like it does this

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17832597
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
 
LVL 13

Expert Comment

by:haim96
ID: 17835003
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 43

Expert Comment

by:Steve Knight
ID: 17835044
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
 
LVL 13

Expert Comment

by:haim96
ID: 17835192
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17835356
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
 
LVL 13

Expert Comment

by:haim96
ID: 17835380
it's looks kind of solved... now the author need to reply.

cheers.
0
 
LVL 7

Author Comment

by:life_j
ID: 17840080
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
 
LVL 13

Expert Comment

by:haim96
ID: 17841379
what about:

/SEC : copy SECurity info (both source and dest must be NTFS).##
0
 
LVL 13

Expert Comment

by:haim96
ID: 17841382
are both source and dest NTFS?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17841628
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
 
LVL 7

Author Comment

by:life_j
ID: 17847035
I need to copy about 6 GB of data.
Does Xcopy copies the NTFS permissions.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17847864
Yes it does when you use the /o switch
0
 
LVL 13

Expert Comment

by:haim96
ID: 17848266
6GB ??
are you sure you don't want to use backup and restore method?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17848309
Well at 50Mb/sec say for gigabit ethernet it;s only 2 minutes copying...
0
 
LVL 13

Expert Comment

by:haim96
ID: 17848314
so you deside he have gigabit ethernet ?
OK...

:)
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17848327
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
 
LVL 7

Author Comment

by:life_j
ID: 17935201
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17936170
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
 
LVL 7

Author Comment

by:life_j
ID: 17942603
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17944760
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17951172
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
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 17975284
Closed, 250 points refunded.
kb
Experts Exchange Moderator
0
 

Expert Comment

by:R2DS
ID: 35517676
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question