Solved

Robocopy reporting/ notification

Posted on 2010-09-02
1
1,343 Views
Last Modified: 2012-05-10
Hello All

I have a Windows 2003 SP2 server and I will be nightly copying user data from there to another server.

I would like some sort of reporting/notification of how the nightly Robocopy job goes.

Does anyone know how we can achieve this? How can I be sure that the data copy job works - ideally, there would be some alert if it -didn't- work.

Any help appreciated guys.
0
Comment
Question by:Joe_Budden
1 Comment
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 33590654
Run a batch script that starts robocopy with the necessary arguments and sends an email (blat.exe from http://www.blat.net/) if the errorlevel is 4 or higher (check robocopy.doc in the ResKit installation folder for details.
Rough draft:
@echo off

setlocal

set LogFile=%~dpn0.log

robocopy.exe "S:\ource\folder" "T:\arget\folder" /mir /np /nfl /ndl /tee /log:"%LogFile%"

if errorlevel 4 (

  blat.exe "%LogFile%" -to me@domain.com -f robocopy@domain.com -subject "Error during robocopy" -server smtp.domain.com

)

Open in new window

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
This is an explanation of a simple data model to help parse a JSON feed
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now