Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RoboCopy 1

Status
Not open for further replies.

intel233

MIS
Feb 24, 2007
289
0
0
US
I need to move user profiles from 1 server to another. I would like to take the NTFS permissions. Robocopy seems like the best bet. The source is a compressed drive.
If I go to the destination server and map the source server would that work? I have tried a couple of syntax's and nothing seems to get copied.

robocopy \\source_Server\profiles\username \\Destination_Server\Profiles\ *.* /IA:CHSR /E /COPYALL /ZB

robocopy f:\profiles\username z:\profiles /ZB (F: is source and Z: is destination)

Any help is appreciated.
 
Look into using the /MIR option. That will allow you to prestage data, then do a "catch up" copy when it's time to actually re-home the users.

Here's what I use
Code:
robocopy.exe i:\ "F:\old drive" /ZB /R:3 /W:2 /TEE /LOG:robocopy.txt /MIR /XA:SH

Do you have your Tek-Tips.com Swag? I've got mine!

Stop by the new Tek-Tips group at LinkedIn.
 
I DO NOT want the NTFS permissions as the source permissions are a mess and incorrect. I do not have access to these directories (admin or enterprise). I am using the following switches
robocopy \\source_server\profiles$\userame \\destination_server\profiles$\username *.* /IA:CHSRA /E /ZB /COPY:DAT

This seems to copy most of the data but I notice when I take ownership on the source and then redo the command it gets more files. Is there another switch I need to use?

TIA
 
it gets more files
Not sure what this means

I do not have access to these directories (admin or enterprise).
Why do you not have access if you are doing this? Are you not part of IT? You should get the proper file system access prior to proceeding or have someone else do it and then EXCLUDE files as you wish. But without permission, you might lose access to some files right off the bat.

/XA:SH to avoid copying system/hidden files. Are those possibly the MORE FILES you were mentioning?? Do you WANT the extra files or not is the question.
 
What I mean is it did not take files from the 1st time I ran it. Once I take ownership of the folder and run the command again it takes files that didn't get copied the first time I ran it, don't know why. I am in IT. As I stated the permissions are a mess. I thought the /ZB handles if there are permission issues.
 
Run it like this first:

robocopy \\source \\destination /e /w:1 /r:1 /log:c:\temp\logfile.txt
The /e Copies subdirectories. Note that this option includes empty directories.
The /w:1 tells the copy job to wait 1 sec for a retry
the /r:1 tells the copy job to retry only once.
the /log: is a text output for a log file.
You should run this job in advance. It will do an initial migration. Once it is complete subsequent retries will only copy the changes


Then you can run it to complete

robocopy \\source \\destination /mir /w:1 /r:1 /log:c:\temp\logfile.txt

The /mir Mirrors a directory tree (equivalent to /e plus /purge).
The /w:1 tells the copy job to wait 1 sec for a retry
the /r:1 tells the copy job to retry only once.
the /log: is a text output for a log file.

Then you can apply your permission settings

Tom
 
I use /mir for all copies, including the initial one. Same syntax every time.

I just moved 10TB of data with it - no problems.

Do you have your Tek-Tips.com Swag? I've got mine!

Stop by the new Tek-Tips group at LinkedIn.
 
Um .. the problem with /MIR is that the OP latterly stated (and at odds with their first post) that they did NOT want the NTFS security copied over
 
Who is Encino40 commenting as if they were the original poster intel233

Multiple identities?
 
oh sh**... Sorry.. I had posted a question but forgot which forum and when I searched for robocopy ntfs I saw the post. I should have read the entire thread.
After looking at my threads I realize it was not here.
Again, sorry about that.
 
If you do not use /sec then the permissions will not be carried over


robocopy \\source \\destination /mir /w:1 /r:1 /log:c:\temp\logfile.txt

or


robocopy \\source \\destination /e /purge /w:1 /r:1 /log:c:\temp\logfile.txt

The /mir Mirrors a directory tree (equivalent to /e plus /purge).
The /w:1 tells the copy job to wait 1 sec for a retry
the /r:1 tells the copy job to retry only once.
the /log: is a text output for a log file.


The /mir Mirrors a directory tree (equivalent to /e plus /purge).
The /w:1 tells the copy job to wait 1 sec for a retry
the /r:1 tells the copy job to retry only once.
the /log: is a text output for a log file.


Tom
 
I am using /IA:CHSRA /E /ZB /COPY:DAT and it seems to be working. The source is compressed and I don't want the permissions to follow. I do not want the source deleted just yet. I will manually delete that. I run it once then on the source take ownership of the dir and run it again. I could probably just take ownership but not sure If I would still have to run it twice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top