[Wolves] e-smith - and a question about local domains - now backup strategy

Mark Ellse me at chaseacademy.com
Thu Jun 17 11:09:47 BST 2004


Andy, James and David,

Thanks for your advice about backing up. In the event we have gone for a 
hybrid approach here. We are using a batch file - copy below - which is 
run by Windows Scheduler. It copies a specified folder and its contents 
(including the subdirectories) across to the designated folder on 
backup. It sets and detects the archive switch so that it doesn't copy 
over anything that has not been changed since the previous backup.

Just in case you are impressed, I didn't write it - it was written by 
another of the physics staff here.

Mark



@ECHO OFF
REM ===========Batch file to back up a given folder, and its subfolders, 
to \\backup\foldername
REM
REM ---1) Has a parameter been given?
if [%1==[ goto noparam
if [%2==[ goto noparam

REM ---2) Take first parameter as username
set trgt=\\BACKUP\%1

REM Get next filespec
:loop
shift

REM ---3) Decide whether the source files exist to avoid error occurring
if [%1==[ goto leave

REM ---3) Copy files across
REM XCOPY /S /E /C %1 %trgt%\%1
XCOPY /M /C /I /R /H /Y /K /S /E %1 %trgt%\%1
goto loop

REM ---Message because no parameter was supplied
:noparam
ECHO No parameter given
ECHO.
ECHO Use:
ECHO BCK computer source
ECHO.
ECHO where source is a filespec (can be wildcarded)
ECHO.
PAUSE
goto leave

:leave
set trgt=


cls





More information about the Wolves mailing list