Discussion:
replicating web files across IIS servers - Suggestions?
(too old to reply)
Tim Watts
2004-02-27 17:56:52 UTC
Permalink
I have set up a small web farm with two Win2k3 IIS6 servers using NLBS. I
have external FTP set up to point to one of the web servers in the farm.

Does anyone have any suggestions of how I can enable some sort of automatic
replication of web files from one server to the other.

It should always be one "Master", with a push install to the other web
servers in the farm when a file changes. Basically a one to many
relationship.

I've been looking at Win2k3's DFS, has anyone used DFS for this before?

Any and all suggestions would be appreciated.

Thanks,

Tim
doug
2004-02-27 18:06:22 UTC
Permalink
DFS
RoboCopy (from the resource kit)
Microsoft Application Centre

doug
-----Original Message-----
I have set up a small web farm with two Win2k3 IIS6
servers using NLBS. I
have external FTP set up to point to one of the web
servers in the farm.
Does anyone have any suggestions of how I can enable
some sort of automatic
replication of web files from one server to the other.
It should always be one "Master", with a push install to
the other web
servers in the farm when a file changes. Basically a one
to many
relationship.
I've been looking at Win2k3's DFS, has anyone used DFS
for this before?
Any and all suggestions would be appreciated.
Thanks,
Tim
.
Tom Kaminski [MVP]
2004-02-27 19:10:08 UTC
Permalink
Post by Tim Watts
I have set up a small web farm with two Win2k3 IIS6 servers using NLBS. I
have external FTP set up to point to one of the web servers in the farm.
Does anyone have any suggestions of how I can enable some sort of automatic
replication of web files from one server to the other.
It should always be one "Master", with a push install to the other web
servers in the farm when a file changes. Basically a one to many
relationship.
I've been looking at Win2k3's DFS, has anyone used DFS for this before?
Any and all suggestions would be appreciated.
Aside from what Doug suggested, VB.NET now makes it really easy to write a
Windows Service that can watch a file system for changes. Just point it at
your Master server and have it make the appropriate changes to your slave
...
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tim Watts
2004-02-27 20:39:03 UTC
Permalink
I would definitely be interested in hearing more about creating a vb.net
service for file monitoring.

DFS/FRS
I've set up DFS in a small test environment, it is taking a very long time
to replicate the initial web root (approx 500mb). Once the initial
replication is complete, I will see how long it takes to replicate changes.
(It is a domain level root, so that automatic replication will occur)


I can't seem to find any documentation on the replication rules. Does anyone
know the answer to the following?

I have created a hub/spoke configuration. With the master server being the
hub, with the secondary server being the spoke. As I delete files on the
master server, will it also delete the same files on the secondary server?

ROBOCOPY
I've also downloaded and installed the robocopy util. It's going to take a
while to read through all of the command lines and options. It seems the
config I am wanting to set up must be extremely common for most people with
a web farm. I am surprised that Microsoft did not include information with
the robocopy for this exact scenario. I did notice the /mir /purge command
arguments. Which might be what I want to try setting up.

Thanks,

Tim
Post by Tim Watts
Post by Tim Watts
I have set up a small web farm with two Win2k3 IIS6 servers using NLBS. I
have external FTP set up to point to one of the web servers in the farm.
Does anyone have any suggestions of how I can enable some sort of
automatic
Post by Tim Watts
replication of web files from one server to the other.
It should always be one "Master", with a push install to the other web
servers in the farm when a file changes. Basically a one to many
relationship.
I've been looking at Win2k3's DFS, has anyone used DFS for this before?
Any and all suggestions would be appreciated.
Aside from what Doug suggested, VB.NET now makes it really easy to write a
Windows Service that can watch a file system for changes. Just point it at
your Master server and have it make the appropriate changes to your slave
...
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tom Kaminski [MVP]
2004-02-27 21:17:22 UTC
Permalink
Post by Tim Watts
I would definitely be interested in hearing more about creating a vb.net
service for file monitoring.
See:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconIntroductionToNTServiceApplications.asp
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemiofilesystemwatcherclasstopic.asp
Post by Tim Watts
ROBOCOPY
I've also downloaded and installed the robocopy util. It's going to take a
while to read through all of the command lines and options. It seems the
config I am wanting to set up must be extremely common for most people with
a web farm. I am surprised that Microsoft did not include information with
the robocopy for this exact scenario. I did notice the /mir /purge command
arguments. Which might be what I want to try setting up.
I use ROBOCOPY with Task Scheduler myself to copy content from my production
server to a "hot" spare. You don't need the /purge switch if you use /mir,
and /sec is nice if you want to maintain ACLs.

robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /mir /sec
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tim Watts
2004-02-27 21:45:35 UTC
Permalink
Hi Tom, thanks for your replies.

In looking at some of the different options I can see using something like
this.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /MIR /MON:1
/SEC

the "/mon:" flag should fire as soon as it sees 1 file changed. Do I
actually need this, or is it implied with the "/MIR" flag? I would think the
/MIR flag would set all of the expected characteristics when mirroring files
and folders.

Is there any way to have this run as a service so that each time the server
is restarted it will automatically start? I guess I could create a batch
file to run when logging in, but that would not help, and I don't usually
have any accounts logged onto the console of the web servers.

Thanks again for all of your help.

Tim
Post by Tom Kaminski [MVP]
Post by Tim Watts
I would definitely be interested in hearing more about creating a vb.net
service for file monitoring.
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconIntroductionToNTServiceApplications.asp
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemiofilesystemwatcherclasstopic.asp
Post by Tom Kaminski [MVP]
Post by Tim Watts
ROBOCOPY
I've also downloaded and installed the robocopy util. It's going to take a
while to read through all of the command lines and options. It seems the
config I am wanting to set up must be extremely common for most people
with
Post by Tim Watts
a web farm. I am surprised that Microsoft did not include information with
the robocopy for this exact scenario. I did notice the /mir /purge command
arguments. Which might be what I want to try setting up.
I use ROBOCOPY with Task Scheduler myself to copy content from my production
server to a "hot" spare. You don't need the /purge switch if you use /mir,
and /sec is nice if you want to maintain ACLs.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /mir /sec
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tim Watts
2004-02-27 23:52:35 UTC
Permalink
Hi Tom, got the DFS/FRS solution working pretty well now.

I think for now this will work well enough.

It takes about 3-5 seconds to detect a change and start replicating the
changed files.


Thanks for everything!

Tim
Post by Tim Watts
Hi Tom, thanks for your replies.
In looking at some of the different options I can see using something like
this.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /MIR /MON:1
/SEC
the "/mon:" flag should fire as soon as it sees 1 file changed. Do I
actually need this, or is it implied with the "/MIR" flag? I would think the
/MIR flag would set all of the expected characteristics when mirroring files
and folders.
Is there any way to have this run as a service so that each time the server
is restarted it will automatically start? I guess I could create a batch
file to run when logging in, but that would not help, and I don't usually
have any accounts logged onto the console of the web servers.
Thanks again for all of your help.
Tim
Post by Tom Kaminski [MVP]
Post by Tim Watts
I would definitely be interested in hearing more about creating a vb.net
service for file monitoring.
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconIntroductionToNTServiceApplications.asp
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemiofilesystemwatcherclasstopic.asp
Post by Tim Watts
Post by Tom Kaminski [MVP]
Post by Tim Watts
ROBOCOPY
I've also downloaded and installed the robocopy util. It's going to
take
Post by Tim Watts
a
Post by Tom Kaminski [MVP]
Post by Tim Watts
while to read through all of the command lines and options. It seems the
config I am wanting to set up must be extremely common for most people
with
Post by Tim Watts
a web farm. I am surprised that Microsoft did not include information
with
Post by Tom Kaminski [MVP]
Post by Tim Watts
the robocopy for this exact scenario. I did notice the /mir /purge
command
Post by Tom Kaminski [MVP]
Post by Tim Watts
arguments. Which might be what I want to try setting up.
I use ROBOCOPY with Task Scheduler myself to copy content from my
production
Post by Tom Kaminski [MVP]
server to a "hot" spare. You don't need the /purge switch if you use
/mir,
Post by Tom Kaminski [MVP]
and /sec is nice if you want to maintain ACLs.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /mir /sec
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running
IIS
Post by Tom Kaminski [MVP]
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tom Kaminski [MVP]
2004-02-28 15:08:14 UTC
Permalink
Post by Tim Watts
Hi Tom, got the DFS/FRS solution working pretty well now.
I think for now this will work well enough.
It takes about 3-5 seconds to detect a change and start replicating the
changed files.
The only thing I don't like about DFS/FRS is that it's two-way, meaning that
if you "screw something up" on the target/slave server, it gets replicated
to your master server.
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tom Kaminski [MVP]
2004-02-28 15:16:57 UTC
Permalink
Post by Tim Watts
Hi Tom, thanks for your replies.
In looking at some of the different options I can see using something like
this.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /MIR /MON:1
/SEC
the "/mon:" flag should fire as soon as it sees 1 file changed. Do I
actually need this, or is it implied with the "/MIR" flag? I would think the
/MIR flag would set all of the expected characteristics when mirroring files
and folders.
Is there any way to have this run as a service so that each time the server
is restarted it will automatically start? I guess I could create a batch
file to run when logging in, but that would not help, and I don't usually
have any accounts logged onto the console of the web servers.
I haven't seen or used that option before, apparently it's new.

I schedule in Task Scheduler it to run every hour - that meets my needs.
You can have it run every n minutes or whatever you need.
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tim Watts
2004-02-29 17:55:57 UTC
Permalink
You can actually set up custom replication, so that it is only one way, from
the master server to the slave.

And the only way for it to automatically check and replicate changes as they
happen is to have a domain level dfs root. If it is set up as a stand alone,
this option is not available.

Tim
Post by Tim Watts
Post by Tim Watts
Hi Tom, thanks for your replies.
In looking at some of the different options I can see using something like
this.
robocopy D:\inetpub\wwwroot \\targetserver\D$\inetpub\wwwroot /MIR /MON:1
/SEC
the "/mon:" flag should fire as soon as it sees 1 file changed. Do I
actually need this, or is it implied with the "/MIR" flag? I would think
the
Post by Tim Watts
/MIR flag would set all of the expected characteristics when mirroring
files
Post by Tim Watts
and folders.
Is there any way to have this run as a service so that each time the
server
Post by Tim Watts
is restarted it will automatically start? I guess I could create a batch
file to run when logging in, but that would not help, and I don't usually
have any accounts logged onto the console of the web servers.
I haven't seen or used that option before, apparently it's new.
I schedule in Task Scheduler it to run every hour - that meets my needs.
You can have it run every n minutes or whatever you need.
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Tom Kaminski [MVP]
2004-03-01 13:45:03 UTC
Permalink
Post by Tim Watts
You can actually set up custom replication, so that it is only one way, from
the master server to the slave.
And the only way for it to automatically check and replicate changes as they
happen is to have a domain level dfs root. If it is set up as a stand alone,
this option is not available.
Thanks - last time I had my ops guys set it up and they must not have known
about the custom settings. I'll check it out.
--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/
Continue reading on narkive:
Loading...