1

My company is responsible for backups on a number of servers for one of our clients. The backup servers are all running Backup Exec 2010. At the end of each month we need to provide a report on how many jobs failed during the month, the reason etc. Currently our techs check a number of success/fail emails each day and record the results in a database. The monthly report then pulls the data from here.

What I am looking at doing now is automating the procedure of a human having to read the success/fail emails every day. Backup Exec allows you access to the SQL database it runs on so that is one way to go. The other would be to direct the success/fail emails to a mailbox and run a script to programatically parse the emails and get the stats that way.

Has anyone had any experience with something similar and can you offer any tips? My background is php/mysql and I will likely be using php to gather the data one way or the other. Thanks.

Matt
  • 251
  • 4
  • 13
  • I'd say accessing the database would be _much_ cleaner than parsing an email. What database does it use? – halfer Sep 17 '13 at 12:14

1 Answers1

0

I would keep the emails only for information.

I will use database for managing stats and result of automated tasks.

Simple example of automated tasks with ability to log the result to email or db:

public function processReceivedBankTransfers($records)
    {
        //call cron watch function
        $cronWatch = $this->_getCronWatch(); 

        // Start you cron watch
        $process = $cronWatch->startProcess("Process bank transfers");

        $today = date("Y-m-d");
        ........


        for ($i = 0; $i < count($records); $i++)
        {

            ...........

            // add the result of you action to db or email or .... 
            $process->addStep($refNo);
        }
        //after the function finish close your cronwatch 
        $process->finish();

        return $records;
} 
BenMorel
  • 34,448
  • 50
  • 182
  • 322
Haver
  • 443
  • 2
  • 11