Link to home
Create AccountLog in
Avatar of Member_2_7964761
Member_2_7964761

asked on

Robocopy on Windows Server 2012 r2 syntax

Hello Experts,

I need to copy over an entire drive from one server to another. I wanted to use Robocopy and tried the following

robocopy \\servername\G$ \\servername\g$  

I get page file error (page in use)
so I tried
robocopy \\servername\G$ \\servername\g$  /XF pagefile.sys      but it only copied over some of the folders and data.

What is the correct syntax?

thanks!
ASKER CERTIFIED SOLUTION
Avatar of Maclean
Maclean
Flag of New Zealand image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Todd Nelson
Do you need to copy permissions too?

Here is a good reference with examples and syntax...
Of course the servernames in your command are different?
Avatar of Member_2_7964761
Member_2_7964761

ASKER

Thanks! I will try this tomorrow. The one switch I don't see is to skip over files in use? (Page file in use) is this available?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks for your help! Got them copied over but still missed a lot of files plus it took 2.5 hours.  We are looking for the best solution for DR.  Is it possible to mount a network drive. This is  possible on Windows server 2012 r2?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Why not use DFS if you want DR for data. Its not the best solution out there perhaps, but its reliable enough, comes with windows and incrementally updates files as data changes, plus if server A fails, it will keep running on the name space using server B. I suppose this is for user data, not full system backups.
Thanks for your help!