Re: Question on Robocopy
- From: "geek-y-guy" <noone@xxxxxxxxxxx>
- Date: Wed, 17 Oct 2007 12:10:32 -0400
"Newell White" <NewellWhite@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:32AFDCD9-2EBA-4115-8BAF-E0AF03B5F648@xxxxxxxxxxxxxxxx
I use this for backing up selected folders from a fileserver with very
brief
log file:
@ECHO OFF
REM batch job to copy changed files from folder \\server1\share\%1 to
E:\backserver1\%1
REM
ECHO %date% copy %1 to backserver1 %time% >> %2
IF NOT EXIST E:\backserver1\%1 MD E:\backserver1\%1
ROBOCOPY \\server1\share\%1 E:\backserver1\%1 /e /xo /r:3 /w:0 /ndl /nfl
/njs /njh /np
ECHO ROBOCOPY errorlevel %errorlevel% >> %2
The /e option copies empty sub-folders to provide the mirror structure.
--
Newell White
Hi Newell: I'm new to robocopy and am interested in implementing it in the
following scenario. I have a primary IIS6 server and I want to duplicate the
website root on the server out to five load-balanced servers.
Is the script above just a .BAT file that you're calling with scheduler? If
so, would I use a similar syntax, just with five robocopy commands (one for
each server)?
Or is there a better way to push updates out to the 5 servers?
TIA, AK
"DT" wrote:
Guys,
I might be having a blonde moment but I recall in the past (have not used
it
for a few years) that Robocopy had the ability to mirror two folders, and
update files based on the file dates in the two folders. That is, if for
instance, we are sync'ing folder A and folder B and the file existed in
both
then the older of the two would be replaced. However I have setup the
following:
robocopy.exe \\server1\share\folder1 \\server2\share\folder2 /MIR
This deletes anything on server2 that does not exist on server1
So I tried this:
robocopy.exe \\server1\share\folder1 \\server2\share\folder2 /MIR /XX
/LOG+:sync2nth.txt
This does not delete anything BUT if a file exists on both servers the
copy
on server2 is overwritten no matter what the file date is.
I am sure I've setup robocopy in the past to do a simple mirror and keep
the
newer version of any files that already exist.
Can anyone help out?
Thanks in advance
Darren
.
- References:
- Question on Robocopy
- From: DT
- Question on Robocopy
- Prev by Date: is it possible to run Remote Desktops MMC snap-in on XP?
- Next by Date: Re: KVM switch for USB and/or PS2
- Previous by thread: Re: Question on Robocopy
- Next by thread: Re: Roaming Profile Take Ownership problem
- Index(es):
Relevant Pages
|