Link to home
Start Free TrialLog in
Avatar of life_j
life_j

asked on

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
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

There is a /SECFIX option which sounds like it does this

Steve
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
Avatar of haim96
haim96

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...
:)
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!
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.
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!
it's looks kind of solved... now the author need to reply.

cheers.
Avatar of life_j

ASKER

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
what about:

/SEC : copy SECurity info (both source and dest must be NTFS).##
are both source and dest NTFS?
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
Avatar of life_j

ASKER

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

:)
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.
Avatar of life_j

ASKER

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.
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)
Avatar of life_j

ASKER

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.
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
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
ASKER CERTIFIED SOLUTION
Avatar of kodiakbear
kodiakbear

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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