• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 465
  • Last Modified:

Replicate folder share between 2 sites - same domain.

Scenario:
Server 2003 R2 Standard SP2 located in London.
Server 2003 Standard SP2 located in Dallas.
Servers belong to same domain, connected via VPN tunnel.

I have a directory share on the server located in Dallas.
Share is working great for my Dallas users however I need my London users to access this share with no problems (specifically slowdowns/speed).

Is there a way to replicate the Dallas share to London?

No, I can't move the share to a different server (if you were even thinking about throwing the R2 stuff at me).
0
sknoll84
Asked:
sknoll84
  • 27
  • 22
1 Solution
 
Donald StewartNetwork AdministratorCommented:
Well you basically 2 options
 
 
1. robocopy  http://www.ss64.com/nt/robocopy.html
2. DFS Step-by-Step Guide to Distributed File System (Dfs)
0
 
mkbeanCommented:
My suggestion would be to also use Robocopy.  In your case you would use the following command from the Dallas server:
robocopy C:\folder_location \\LondonServer\Share /MIR /Z

You will want to run this as a scheduled job as frequently as you want the content to be updated.  The /MIR will mirror the two directories.  The /Z will reattempt a connection if it is disconnected.

Brian
0
 
sknoll84Author Commented:
This share in Dallas is going to contain spreadsheets, docs, etc.
This data will be updated very very frequently and I need to users in London to see the changes immediatly.

Will the above suggestions still be a good path to follow?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
Donald StewartNetwork AdministratorCommented:
You can schedule it to run every x minutes with scheduled tasks and it only copies files that have changed
0
 
sknoll84Author Commented:
will this nail my performance over a VPN tunnel?
0
 
Donald StewartNetwork AdministratorCommented:
From the link I provided
 
To limit the network bandwidth used by robocopy, specify the Inter-Packet Gap parameter /IPG:n
This will send packets of 64 KB each followed by a delay of n Milliseconds.
 
0
 
Donald StewartNetwork AdministratorCommented:
I myself recommend using dfs, you can control the bandwidth, replication schedule and a lot more than robocopy. DFS also only copys the part that changed, not the whole file that changed
0
 
sknoll84Author Commented:
i failed to mention the ntfs permissions i have setup in dallas must replicate exactly to london - will is robocopy capable of this?
0
 
Donald StewartNetwork AdministratorCommented:
Yes robocopy is capable
 
 /SEC : Copy files with SECurity (equivalent to /COPY:DATS).
 
0
 
sknoll84Author Commented:
I'm liking the robocopy idea and want to give this a shot tonight.

BUT, the data in Dallas will be mirrored to London - What if changes are made to the data in London, will they be reflected in Dallas or is there something else I have to do on the London server?
0
 
Donald StewartNetwork AdministratorCommented:
Here's a good article to help you

http://winhlp.com/node/58
0
 
Donald StewartNetwork AdministratorCommented:
0
 
sknoll84Author Commented:
gui was pretty cool - it's copying data from destination to source with /mir /z /sec /ipg:100
it sounds as if i just schedule a task for this .bat to run every 2 minutes.
what about data in London, if it's updated in London, how will it get to Dallas?
0
 
Donald StewartNetwork AdministratorCommented:
you run Robocopy twice -- once in each direction.  Use the /XO switch to exclude older files.

You can test it by using the /L switch
0
 
sknoll84Author Commented:
run from Dallas every 2 minutes:
robocopy "F:\G2 Portal" "\\london-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO

run from London every 2 minutes:
robocopy "F:\G2 Portal" "\\dallas-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO

(they just so happened to both be located on the F: drive of each server)

would this work okay?
is this what the "guru" would do?
0
 
sknoll84Author Commented:
why is it moving so slow?  any ideas how to speed this up....?
0
 
Donald StewartNetwork AdministratorCommented:
Not sure about the speed except for maybe the upload speed. You can run both tasks on just the one server. You might want to wait until it is all copied to london first before starting the second task.
0
 
Donald StewartNetwork AdministratorCommented:
Try the /copyall switch to first copy all the data over and then set up your tasks.
0
 
Donald StewartNetwork AdministratorCommented:
Use these switches to first get it copied over

/COPYALL /B /SEC /MIR
0
 
sknoll84Author Commented:
okay, that's what i'm running and it is much quicker.

once complete i'll schedule the other .bat's

every 2 minutes run dallas
every 5 minutes run london
/MIR /SEC /V /NP /Z /R:10 /W:30 /XO

can any collisions/corruption/loss of data occur if the schedules overlap or if a user has a document open, or is saving at the wrong time ?
0
 
Donald StewartNetwork AdministratorCommented:
You will probably have to keep both  the schedules the same, every 2 and 5 minutes will overlap every 5th time
0
 
Donald StewartNetwork AdministratorCommented:
0
 
sknoll84Author Commented:
need help with the scheduled task then.
you're saying run both scripts at the same time?  i figured there would be a conflict of some sort.

in scheduled tasks how can i run this every so many minutes 24/7 ?

2-23-2009-9-48-57-PM.png
0
 
Donald StewartNetwork AdministratorCommented:
You may use the /MON and /MOT switches

            /MON:n : MONitor source; run again when more than n changes seen.
            /MOT:m : MOnitor source; run again in m minutes Time, if changed

http://www.sysbuddies.com/empty-t2.0.html



SO I'm thinking run one batch on both servers with the switches above and you wont need the scheduled task except for server reboots to restart the command.
0
 
sknoll84Author Commented:
okay so let's talk about these /MON and /MOT switches.

if I use /MON:8
will this rerun the script after 8 changes are detected?

if I use /MOT:2
will this rerun the script every 2 minutes?
0
 
Donald StewartNetwork AdministratorCommented:
if I use /MON:8
will this rerun the script after 8 changes are detected? YES>>>also no need to schedule task to run every so often(just have it run at system startup)
if I use /MOT:2
will this rerun the script every 2 minutes?  YES only  IF there were changes



0
 
sknoll84Author Commented:
earlier you said run one batch script on both servers.....excuse my ignorance, but please clarify.
sounds like the /MOT switch is best in this situation.

so on the london server ill have one script, on the dallas server ill have another script.
will both scripts be identical or will each script be different in that of the file location path?

robocopy "F:\G2 Portal" "\\london-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2
 
robocopy "F:\G2 Portal" "\\dallas-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2

Open in new window

0
 
Donald StewartNetwork AdministratorCommented:
I would try the one script on both servers method with the scripts as you have them above.
0
 
Donald StewartNetwork AdministratorCommented:
I've only used robocopy to copy oneway(because I now use DFS) and I still use robocopy to backup users profiles from remote branches. So I havent tried all of the switches.
0
 
sknoll84Author Commented:
in dallas run:
robocopy "F:\G2 Portal" "\\london-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2

in london run:
robocopy "F:\G2 Portal" "\\dallas-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2

place this in the startup folder of all users?  kick off the script immediatly on both servers?
does all of the above sound correct?
0
 
sknoll84Author Commented:
shoot me straight here - in this situation should i use dfs or robocopy?
0
 
Donald StewartNetwork AdministratorCommented:
how much data is this and how many users??
0
 
sknoll84Author Commented:
currently 150 MB but could easily increase to 250 MB.....or more.
130 domain users - 80 users in dallas and 50 users in london.
0
 
Donald StewartNetwork AdministratorCommented:
Ok, as ive been saying I would use DFS(that's me). Once you get it set up it works great. There's a management console and you can get health reports.
 
read these two articles
 
http://technet.microsoft.com/en-us/library/cc787066.aspx
http://technet.microsoft.com/en-us/library/bb727150.aspx 
0
 
sknoll84Author Commented:
will DFS ONLY work with R2 edition?

The server that contains the share is Server 2003 Standard SP2.
It will need to replicate this share to Server 2003 R2 Standard SP2.
0
 
Donald StewartNetwork AdministratorCommented:
0
 
sknoll84Author Commented:
Blasted Standard version of Server 2003 doesn't give me the DFS Management snap-in.
This I need to take full advantage of this replication.......

SO, I'm going back to robocopy.
Hang in there dstewartjr, soon your solutions will be accepted ;-)

Let's talk robocopy again.

I have a share in Dallas that needs to replicate to London.
I would like replication to take place every 2 minutes (if changes were made in London, 2 minutes later those changes will replicate to Dallas).

Question 1:  Do I run a batch script on BOTH servers ?
Question 2:  Do I kick this script off once, and it will continue to run (with use of the /MON switch) ?
0
 
Donald StewartNetwork AdministratorCommented:
I would think that you would still be able to use your other server which is R2.
 
and yes and yes to 1 and 2
0
 
Donald StewartNetwork AdministratorCommented:
Just in case you wanted to know
 
Q: What will R2 cost?
A: R2 will simply replace existing Windows Server 2003 SKUs when it's released and will therefore be the same price as Windows Server 2003. However, Software Assurance (SA) customers will get Windows Server 2003 R2 at no cost if the release ships during their subscription timeframe.
0
 
sknoll84Author Commented:
okay, so here's my final plan:

In London the following script will be run:
robocopy "F:\G2 Portal" "\\dallas-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2

In Dallas the following script will be run:
robocopy "F:\G2 Portal" "\\london-svr\G2 Portal" /MIR /SEC /V /NP /Z /R:10 /W:30 /XO /MOT:2

I am going to kick each one off now - both placed in the startup folder.

Question 1:  If I log off the server, will robocopy continue to run?
Question 2:  With the switches I'm using, does anyone see any conflicts?
0
 
Donald StewartNetwork AdministratorCommented:
I would place those lines in a batch and schedule the batch to run at system startup(manually starting it for the first time).
 
This will probably be some trial and error
0
 
Donald StewartNetwork AdministratorCommented:
Thought you might want to revisit this notion :-)
I would at least set it up and test it first with a test folder to get acclaimated with it.
 
Step-by-Step Guide for the Distributed File System Solution in Windows Server 2003 R2
One server must run Windows Server 2003 R2. This is the server on which you will install the DFS Management snap-in to perform the tasks in this guide.

The second server must run Windows Server 2003 SP1 or Windows Server 2003 R2.



0
 
sknoll84Author Commented:
I would really like to use DFS....and maybe I could still use it.
....tricky tricky.....

so I kicked off dallas to london, I used the /MOT switch to monitor changes every 2 minutes.
while logged into the dallas server, I made changes and every 2 minutes robocopy replicated my changes.
I logged off the server, made changes via the network share.....and robocopy DID NOT replicate my changed to london.
I was afraid of this, and scheduled tasks is at best able to run daily, but not every few minutes.

So I may be forced into DFS, no matter how screwed up this R2 situation is.
I attached the output of my dallas to london replication.....works great if you stay logged in!
2-26-2009-2-41-36-PM.png
0
 
Donald StewartNetwork AdministratorCommented:
did you try logging off and then unc path to the london machine and start the task while you are logged off?
 
you could also use sc create to keep it running http://support.microsoft.com/kb/251192
0
 
sknoll84Author Commented:
don't know if I understand your question.  I logged off the server, UNC'd to the dallas share, made changes, waited a few minutes.....and my changes never replicated to london.

HOWEVER:  while logged into the dallas server (which is running my robocopy script) I UNC'd to the dallas share, made changes.....and the changes totally replicated as expected......logging off the server terminates the batch script which deems the /MON switch useless.

I will explore creating a Windows Service - if I can create a service to constantly run robocopy then we have a solution!
0
 
sknoll84Author Commented:
you know earlier I read about making my script a service but it must be a .exe
because this is a .bat, I am unable to use SC.

forgive my poor developer knowledge, but surely I can't rename this to a .exe and expect it to work.
back in the VB6 days I was bustin out worthless .exe's - is that what it's going to take, or do you have an easy solution to take my .bat and turn it into a .exe ?

0
 
Donald StewartNetwork AdministratorCommented:
Did you try scheduling the task to run in the future(a minute or so after you log off) and then test?
 
0
 
sknoll84Author Commented:
I understand what you're saying - I'm going to turn this into a .exe and make it a service though.
I'm just about done with you my man...
0
 
sknoll84Author Commented:
i ended up converting my .bat to .exe - used SC to create a service, now just having trouble getting the service to start.  thought it was .net sp1 related but that didn't resolve.  i'll open a new question on getting this service to start.  thanks for all your help.....robocopy it was and is.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 27
  • 22
Tackle projects and never again get stuck behind a technical roadblock.
Join Now