Solved

Robocopy reporting/ notification

Posted on 2010-09-02
1
1,362 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

20 Experts available now in Live!

Get 1:1 Help Now