Note: Taken out the scripts link to improve on the crappy codes I wrote, sorry about this.
This script was developed to automatic the report on some backup job status that we have on small branches. Traditionally, the team members would read the entire backup log to determine any issues before reporting on the status at the start of day of operations. This script reads the backup log, determines if there is any errors and reports the errors and failure found and sends an email to our team email with the status.
Something you need to know to understand how the script was written:
- Robocopy is used to backup user data from our small branch into sgp’s filer
- Each branch’s filer have about 2-3 scheduled jobs at least, each job backup different parts of user’s data, like group data, user data, profile, etc.
- The schedule backup jobs kicks off every night. In the morning the script picks up those backup logs and send the SOD report.
- Some backup jobs don’t run during weekends and some jobs run over 2 days (during weekends, for example), as such the script reads a delimited file with exceptions built into them (see the comments in the script)