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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the correct way to setup a sync between two servers wit

Status
Not open for further replies.

alonzow

IS-IT--Management
Oct 27, 2007
9
FR
Hello,
What is the correct way to setup a sync between two remote servers with robocoby so that if a file is removed in either server this will be reflected once the schedular is run?

We have two Windows 2003 Servers, not in the same location.
Thanks
 
Thank you for your response, it does make sense to setup a DFS, but my primary task for now is to figure out why the two servers are not syncing correctly when using robocopy, as I don't have error files at the present to track the problem, I wanted to find before hand if there was a correct way to do this.

Thanks

 
Hi,
Here is the scheduled command.

REM STAT 2007
for /F "tokens=1,2* delims=/" %%A IN ('echo %date%') DO set filename=%%C_%%B_%%A
for /F "tokens=1,2* delims=:," %%A IN ('echo %time%') DO set filename=%filename%_%%Ah%%B
set filename=%filename%_STAT2007.log
robocopy "D:\source" "\\destination" /xo /r:3 /w:2 /E /log:%filename% /v /ts /np /xf *.rsw *.ppl *.tpl *.osi *.3ds *.sim *.dat *.out *.dbs *.msh

REM STAT 2006
for /F "tokens=1,2* delims=/" %%A IN ('echo %date%') DO set filename=%%C_%%B_%%A
for /F "tokens=1,2* delims=:," %%A IN ('echo %time%') DO set filename=%filename%_%%Ah%%B
set filename=%filename%_STAT2006.log
robocopy "D:\source" "\\destination" /xo /r:3 /w:2 /E /log:%filename% /v /ts /np /xf *.rsw *.ppl *.tpl *.osi *.3ds *.sim *.dat *.out *.dbs *.msh

###

Should I add the /MIR switch?
 
You may have answered your own question. Isn't the /MIR option used to mirror source/dest?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top