Email/RSS Feed of Reports

From wiki.zmanda.com
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

ZRM for MySQL has multiple ways of getting reports on backup runs. It can provide reports as email to the database administrator or as RSS feed.

Backup Reports as Emails

ZRM for MySQL sends email to MySQL database administrator after every backup run. The email contains information about the status of backup run, backup statistics, location of backup and backup level.

mailto parameter in mysql-zrm.conf configuration file should be configured to set email notification. The machine where ZRM for MySQL is running should be configured for sending emails.

"mail-policy" specifies when the email is sent. You can configuration email notification only for backup failures.

All backup report email messages from ZRM for MySQL have [ZRM for MySQL Report] in the subject for easy filtering of ZRM for MySQL emails.

Example: Mail message sent after successful full backup run.

Subject: [ZRM for MySQL Report] backup-set BackupSet1
Backup set=BackupSet1
Backup date=Fri Sep 15 10:39:01 2006
Backup level=0
Raw Databases(Snapshot)=wikidb
Raw Databases=mydb mysql
Logical Databases=forumsdb
Backup size=0.62 MB
Backup time=00:00:05
Backup status=Backup succeeded

Backup Reports as RSS Feeds

ZRM for MySQL backup reports can be configured to be available through RSS feeds. MySQL administrators can use any RSS reader.

Configuring Backup Report for RSS Feed

  • Configure for automatic generation of backup reports.
  • Configure RSS Feed parameters in the mysql-zrm.conf.
  • These parameters can be specified in the global configuration file or the backup set specific configuration file.
  • webserver-url  : URL of the webserver location that is used to access the RSS feed. Example: http://backupserver.example.com/Reports
  • rss-header-location  : The name of the RSS header file created in the last step. It is usually /usr/share/mysql-zrm/plugins/RSS.header
  • html-reports  : List of backup reports about the backup runs that are available as RSS feed. Multiple predefined backup reports can be specified as values. The values are separated by , (comma) character.
  • html-report-directory : Directory where HTML and Text backup reports are created. This directory must be under webserver document root so that the directory contents are accessible using the web server. The access to this directory should be restricted to prevent unauthorized access to backup reports.
  • destination : Backup root directory. Default value is /var/lib/mysql-zrm

Example:

RSS feed configuration in mysql.zrm.conf

html-reports=backup-status-info
webserver-url=http://backupserver.example.com/reports/html
rss-header-location=/usr/share/mysql-zrm/plugins/RSS.header
destination=/home/backup/zrm (This parameter is only needed if your backup root directory is different from the default)
  • Modify RSS header file template available in /usr/share/mysql-zrm/plugins/RSS.header for the webserver configuration.

RSS header template file contents:

Title = "Zmanda Recovery Manager for MySQL backup reports"
Link = "http://yourbackupserver.example.com/"
Creator = "yourbackupserver.example.com"
Publisher = "yourbackupserver.example.com"
Rights = "Copyright 2006, Example.com"
Subject = "ZRM for MySQL backup"
Description = "Reports generated by Zmanda Recovery Manager (ZRM) for MySQL"
Language = "en-us"
ManagingEditor = "webmaster\@yourbackupserver.example.com"
webMaster = "webmaster\@yourbackupserver.example.com"
UpDatePeriod = Daily
UpDateFrequency = 1

Replace yourbackupserver.example.com with fully qualified domain name of the server running ZRM for MySQL. Replace example.com by the domain name of the company.

Assumption: Webserver is local to ZRM for MySQL

Example: rss.xml file created for a backup run:

<?xml version="1.0" encoding="UTF-8"?>
 <rss version="2.0" >
 <channel>
      <title>Zmanda Recovery Manager Backup Reports for MySQL</title>
      <link>http://backupserver.example.com/</link>
      <description>Reports Created by Zmanda Recovery Manager (ZRM) for MySQL</description>
      <language>en-us</language>
      <copyright>Copyright 2005, example.com</copyright>
      <pubDate>Tue, 10 Oct 2006 13:52:50 -0700</pubDate>
      <lastBuildDate>Tue, 10 Oct 2006 13:52:50 -0700</lastBuildDate>
      <managingEditor>[email protected]</managingEditor>
      <webMaster>[email protected]</webMaster>
      <item>
           <title>Backup Report for MySQL ZRM at 04:00:20 PM on 2006-10-10</title>
           <link>http://backupserver.example.com/reports/html/backup-status-04002010102006.html</link>
           <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup 
                        and recovery solution for MySQL server.
          </description>
      </item>
       
      <item>
           <title>Backup Report for MySQL ZRM at 01:52:50 PM on 2006-10-10</title>
           <link>http://backupserver.example.com/reports/html/backup-status-01525010102006.html</link>
           <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup 
                        and recovery solution for MySQL server.
           </description>
      </item>
  </channel>
</rss>