Deployment Solution

 View Only

How to Synchronise Your PXE Over Various Servers in Other Locations 

Oct 27, 2008 05:20 PM

In large environments with offsite locations in different cities, you have to build various Deployement Servers. But then you have to build various PXE environments also.

This is a tough job to manage, and it creates a lot of headaches. I did this quit often, but I use a deployment script for this.

Now I'm going to share the script to you.

cls
@ECHO OFF

:: ==========================================================================
:: ***                                  ***
:: ***              SYNCPXE.CMD               ***
:: *** This script synchronizes the INSTALL directory on all PXE servers. ***
:: ***                                  ***
:: ==========================================================================

:: *** Change the settings below for your environment:

SET SourceSERVER=Servername
SET REPL=\\%SourceSERVER%\REPLICATIE$
SET SRVLST=%REPL%\pxeservers.lst
SET REPJOB=PXECONTENT
SET SourceDIR=INSTALL$
SET TargetDIR=INSTALL$
SET EXCLUDEDIR=             

::Creating LOGS\PXECOPY folder
if not exist %REPL%\LOGS\PXEcopy md %REPL%\LOGS\PXEcopy
FOR /F "tokens=2-4 delims=;/- " %%i IN ('DATE /T') DO SET LOGFILE=%REPL%\LOGS\PXEcopy\content_copy-%%k-%%j-%%i.LOG

TITLE SYNC%REPJOB%
ECHO *** start van SYNC%REPJOB% ***

::*** Replicate to target servers
ECHO. >>%LOGFILE%
ECHO **********************************************************************>>%LOGFILE%
ECHO **         S T A R T  R E P L I C A T I ON         **>>%LOGFILE%
ECHO **********************************************************************>>%LOGFILE%
ECHO.>>%LOGFILE%

FOR /F "eol=; tokens=1,2" %%i IN (%SRVLST%) DO %REPL%\ROBOCOPY.exe \\%SourceSERVER%\%SourceDIR%\ \\%%i\%TargetDIR%\ /MIR /COPY:DATS /Z /R:3 /W:3 /NP /XD %EXCLUDEDIR% /TEE /LOG+:%LOGFILE%

SET REPJOB=
SET SourceSERVER=
SET SourceDIR=
SET TargetDIR=
SET EXCLUDEDIR=


The script can be adjusted by typing the servers and directory after the =

Regards
Erik Westhovens

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.