robocopy

Hi,

I have a data that I need to migrate from server A to server B. Size of the data is 40GB

Could you please write me a best robocopy code action this? Servers are 2012 r2 Stadandard

there seem to be a lot of robocop switches and hence I am not sure what is best method to use. I would like to keep everything as it is in the destination server ( server b)

Thanks
kuzumAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
You can run the command below

robocopy /MIR /E /Z /LOG:C:\Robocopylog.txt /TEE /R:2 /W:0

/MIR Mirrors a directory tree
/E Copies all subdirectories including empty ones.
/Z Copies files in restartable mode (that is, restarts the copy process from the point of failure).
/LOG: Generates a log file name robocopylog.txt
/TEE Logs to file as well as to the console
/R:0 Number of times to retry copying a locked file
/W:0 Time in between retry attempts

http://www.giveandtake638.com/sys-admin/use-robocopy-movemigrate-foldersdirectoryies-one-server-another-another-location
0
kuzumAuthor Commented:
Hi,

where do I have to define source and the tartget?  thanks for your reponse.
0
Emmanuel AdebayoGlobal Windows Infrastructure Engineer - ConsultantCommented:
robocopy <Source> <Target> /MIR /E /Z /LOG:C:\Robocopylog.txt /TEE /R:2 /W:0
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Sikhumbuzo NtsadaIT AdministrationCommented:
Hi,

Here is my script, just change the server Echo_Server and put your source server. This script is running on my files server and fetches data from the audio server. The folder is not shares hence I specified the admin share and the username on my file server has admin rights.


Robocopy \\echo_server\c$\VoIPVillin\Audio D:\Shares\Server_Backups\Echo_Server /e /r:2 /w:5
0
Bill PrewCommented:
I have a data that I need to migrate from server A to server B
Can you be more specific what you mean by this?  What is meant by "a data", is this just one folder and all it's subfolders, or is it multiple folders, etc?  Do any of the folders or files exist in the destination, or will it all be new and placed in one new folder?  Need a little more info to make sure no data is lost and the best options are provided.

~bp
0
kuzumAuthor Commented:
thanks Bill

it is a folder with lots of subfolder. it will be a new folder in the destination folder. Not worried about the permissions. What is the exact syntax for this code

robocopy <Source> <Target> /MIR /E /Z /LOG:C:\Robocopylog.txt /TEE /R:2 /W:0

It says network path not found?

thanks
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
<Source> and <Target> need to be replaced both completely, like
robocopy \\serverA\shareA\folder \\serverB\shareB\folder\folder\ /MIR /E /Z /LOG:C:\Robocopylog.txt /TEE /R:2 /W:0 

Open in new window

0
NVITCommented:
Also add the /DCOPY:T switch to copy folder dates. Else the target folders use the current date and time
0
kuzumAuthor Commented:
it does not seem to be happy with my source address although I am typing as you guys showing me.
Can this not pick up anything in the source location? we should be able to tell to pick up anyhthing it sees in the sources ?
0
NVITCommented:
Post your code so we can see it.
0
kuzumAuthor Commented:
robocopy \\mysourceserver\E\folder_i_want_to_migrate \\mydestinationserver\S\temp\ /MIR /E /Z /LOG:C:\Robocopylog.txt /TEE /R:2 /W:0
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Remove the trailing backslash from the destination - but that isn't the issue. What exactly happens?
0
NVITCommented:
To elaborate on Qlemo... Ideally, upload Robocopylog.txt. Else, post any obvious errors
0
Bill PrewCommented:
You can make sure the locations are accessible from a command prompt by doing:

dir \\mysourceserver\E

and

dir \\mydestinationserver\S

Make sure you don't get any errors there...

~bp
0
kuzumAuthor Commented:
thank you. ISsue seems to be my access rights to some of the subfolders within the folders
when I do get-content \\servername\share  I am receving  Cannot find path \\mysourceserver  because it does not exists.

any way of taking ownership of all the data I am migrating from my source machine within the command?
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Not within the command. You'll have to run
takeown /F \\mysourceserver\share /R /A /D Y

Open in new window

or
takeown /S mysourceserver /F C:\Share /R /A /D Y

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.