Email/RSS Feed of Reports: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
m (do not use existing domainnames in examples (http://en.wikipedia.org/wiki/Example.com))
Line 30: Line 30:
* Configure RSS Feed parameters in the mysql-zrm.conf.
* 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.
* 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.company.com/Reports''
* ''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''
* ''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-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.
Line 40: Line 40:


  html-reports=backup-status-info
  html-reports=backup-status-info
  webserver-url=http://backupserver.company.com/reports/html
  webserver-url=http://backupserver.example.com/reports/html
  rss-header-location=/usr/share/mysql-zrm/plugins/RSS.header
  rss-header-location=/usr/share/mysql-zrm/plugins/RSS.header


Line 48: Line 48:


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


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


Assumption: Webserver is local to ''ZRM for MySQL''  
Assumption: Webserver is local to ''ZRM for MySQL''  
Line 71: Line 71:
   <channel>
   <channel>
       <title>Zmanda Recovery Manager Backup Reports for MySQL</title>
       <title>Zmanda Recovery Manager Backup Reports for MySQL</title>
       <link><nowiki>http://backupserver.company.com/</nowiki></link>
       <link><nowiki>http://backupserver.example.com/</nowiki></link>
       <description>Reports Created by Zmanda Recovery Manager (ZRM) for MySQL</description>
       <description>Reports Created by Zmanda Recovery Manager (ZRM) for MySQL</description>
       <language>en-us</language>
       <language>en-us</language>
       <copyright>Copyright 2005, company.com</copyright>
       <copyright>Copyright 2005, example.com</copyright>
       <pubDate>Tue, 10 Oct 2006 13:52:50 -0700</pubDate>
       <pubDate>Tue, 10 Oct 2006 13:52:50 -0700</pubDate>
       <lastBuildDate>Tue, 10 Oct 2006 13:52:50 -0700</lastBuildDate>
       <lastBuildDate>Tue, 10 Oct 2006 13:52:50 -0700</lastBuildDate>
       <managingEditor>webmaster@backupserver.company.com</managingEditor>
       <managingEditor>webmaster@backupserver.example.com</managingEditor>
       <webMaster>webmaster@backupserver.company.com</webMaster>
       <webMaster>webmaster@backupserver.example.com</webMaster>
       <item>
       <item>
             <title>Backup Report for MySQL ZRM at 04:00:20 PM on 2006-10-10</title>
             <title>Backup Report for MySQL ZRM at 04:00:20 PM on 2006-10-10</title>
             <link><nowiki>http://backupserver.company.com/reports/html/backup-status-04002010102006.html</nowiki></link>
             <link><nowiki>http://backupserver.example.com/reports/html/backup-status-04002010102006.html</nowiki></link>
             <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup  
             <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup  
                         and recovery solution for MySQL server.
                         and recovery solution for MySQL server.
Line 89: Line 89:
       <item>
       <item>
             <title>Backup Report for MySQL ZRM at 01:52:50 PM on 2006-10-10</title>
             <title>Backup Report for MySQL ZRM at 01:52:50 PM on 2006-10-10</title>
             <link><nowiki>http://backupserver.company.com/reports/html/backup-status-01525010102006.html</nowiki></link>
             <link><nowiki>http://backupserver.example.com/reports/html/backup-status-01525010102006.html</nowiki></link>
             <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup  
             <description>Zmanda Recovery Manager (ZRM) for MySQL is flexible and robust backup  
                         and recovery solution for MySQL server.
                         and recovery solution for MySQL server.

Revision as of 08:34, 28 December 2007

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.

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.

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
  • 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>