MYSQL-ZRM-REPORTER(1)
π mysql-zrm-reporter π
okay bestie, this is the manual page for mysql-zrm-reporter from ZRM for MySQL. It's a big one, so buckle up β this is part 1, and there's more coming. π«Ά
β¨ NAME β¨
mysql-zrm-reporter β the ZRM for MySQL backup reporting utility. She reports. That's her whole job. π
πΈ SYNOPSIS πΈ
mysql-zrm-reporter [--fields name1, name2, name3, name4, name5 ....]
[--destination dir]
[--where fieldname=value]
[--type html]
[--output filename]
[--latest]
[--noheader]
[--show backup-method-info |
backup-status-info |
backup-retention-info |
backup-performance-info |
restore-full-info |
restore-incr-info |
replication-info |
backup-app-performance-info]
[--help]
π¦ DESCRIPTION π¦
so the mysql-zrm-reporter utility is the one that serves up reports about all your MySQL database backup runs β both the pre-defined ones and the user-defined ones you cook up yourself. Those reports can come out in text or HTML format. And plot twist: a backup report can even be sent as an RSS feed. iconic behavior honestly. β¨
You configure your backup reports using the parameters in the /etc/mysql-zrm/mysql-zrm-reporter.conf file. For the supported formats, go peek at mysql-zrm-reporter.conf(5). π
The ZRM for MySQL configuration file β that's mysql-zrm.conf(5) β holds the HTML configuration and RSS feed configuration parameters for the mysql-zrm-reporter utility. Here's the list of mysql-zrm-reporter parameters, no gatekeeping:
html-report-directoryβ sets the directory where the text/HTML reports get written. This parameter is optional. Example:/var/www/html/mysql-zrm-reports/html-reportsβ the list of pre-defined report(s) to be generated after a backup run. Example:backup-status-infowebserver-urlβ the RSS feeds URL of a directory under the document root of the web server. Heads up: if this value is not specified in themysql-zrm.conf(5)configuration file, RSS feeds will not be generated. Example:http://backupserver.company.com/reports/rss-header-locationβ the location of the RSS feed properties file, the one containing the RSS feed channel and item properties. This parameter must be provided ifwebserver-urlis specified. Example:/etc/mysql-zrm/RSS.header
π BACKUP INFORMATION π
Every single backup run generates the following info about the backup. Know your fields, bestie β you'll need their names later:
backup-dateβ the date and time stamp of the backup run. β°mysql-versionβ the MySQL server version.backup-directoryβ the location of the backup directory. πbackup-levelβ lists the backup-level:0for a full backup and1for an incremental backup.raw-databasesβ the list of databases backed up usingmysqlhotcopy. If theraw-tablesparameter is present, this will have only one database listed.raw-tablesβ the list of tables backed up usingmysqlhotcopy. The name of the database these tables belong to is found underraw-databases.raw-databases-snapshotβ the list of databases backed up using lvm snapshots. When theraw-tablesparameter is specified, this will list only one database.raw-tables-snapshotβ the list of tables backed up usingmysqlhotcopy. The name of the database these tables belong to is found underraw-databases.backup-timeβ the time taken for the complete backup run. Format isHH:MM:SS.read-locks-timeβ the time the read lock was held during the backup run. Format isHH:MM:SS.flush-logs-timeβ the time for flushing database pages to the disk. Format isHH:MM:SS.backup-sizeβ the size, in megabytes, of the data backed up.backup-statusβ the status has three values."Backup Failed"means there was a fatal error."Backup done with errors"means that even though there was some error during the backup, some of the databases and tables were probably backed up."Backup succeeded"means the backup run was completed successfully. πlogical-databasesβ the list of databases backed up usingmysqldump(1). When the-tablesparameter is specified, this will only one database.logical-tablesβ the list of tables belonging tological-databasesbacked up usingmysqldump(1). The name of the database these tables belong to is found under-databases.replicationβ the list of replication files backed up, namelymaster.infoandrelay-log.info.slave-load-filesβ the names ofSQL_LOAD*files that were backed up.incrementalβ the names of the binary log files backed up.backup-setβ the name of the backup set this backup belongs to.commentβ the comment about the backup added by the administrator in themysql-zrm.conf(5)file.retention-policyβ the backup image will be retained for the time specified as a parameter in Days/Weeks/Months/Years. For example: if the value is"10D"that means the backup image will be retained 10 days from thebackup-date. Heads up: this policy assumes 365 days in a year and 30 days in a month.compressβ specifies that the backup was compressed. The default compression method is thegzipprogram. The program used for compression is the value for this parameter.encryptβ the program used for encryption if the backups are encrypted. πhostβ the hostname of the MySQL server that was backed up.compress-encrypt-timeβ the time taken by compression and/or encryption. Just so you know: this time is included in the backup time.innodb-dataβ the list of InnoDB shared data files backed up.innodb-logsβ the list of InnoDB logs backed up.
π OPTIONS π
--show backup-method-info | backup-status-info | backup-retention-info | backup-performance-info | restore-info | selective-restore-info | replication-infoβ set this option to display the predefined reports. The predefined reports, and exactly what they contain, are listed below:backup-status-info:backup-set,backup-date,backup-level,backup-status,backup commentbackup-method-info:backup-set,raw-databases,raw-databases,logical-databasesbackup-retention-info:backup-set,backup-date,backup-level,backup-size,retention-policybackup-performance-info:backup-set,backup-date,backup-level,backup-size,backup-size-compressed,backup-time,compress-encrypt-timebackup-app-performance-info:backup-set,backup-date,backup-level,backup-size,backup-time,read-locks-time,flush-logs-timerestore-info:backup-set,backup-date,backup-level,backup-directory,backup-status,commentselective-restore-info:backup-set,backup-date,incrementalreplication-info:backup-set,backup-date,replication,slave-load-files
--destination dirβ sets the backup root directory. This parameter is optional. The default value is/var/lib/mysql-zrm.--fields name1,name2,name3...β sets the list of backup parameters to display. The list of valid field names is described in the BACKUP INFORMATION section. This field is optional. By defaultbackup-set,backup-date,backup-level,backup-status,commentare displayed. And listen: spaces are not allowed with in the parameter name list. If spaces must be used, the list must be within quotes. π--where fieldname=valueβ the utility will display the MySQL backup parameters where the field name matches value. This field is optional.--type htmlβ the report will be in HTML format.--output filenameβ the HTML report will be written to filename under the"html"directory, and text reports will be written to filename under the"text"directory. By default, these directories are created under the current working directory. The utility lets users specify an explicit directory location for reports inmysql-zrm.conf(5)using the"html-report-directory"parameter. If this parameter is set, then the utility will create the"html-report-directory"directory (if it does not exist) and the output report with name filename will be written to the"html"and/or"text"sub-directory under the"html-report-directory"path. ποΈ--latestβ report about the most recent backup run.--noheaderβ generate TEXT reports with no page header. Just so you know, this option will be ignored for HTML reports.--helpβ displays the help message and exits.
π EXAMPLES π
To display backup date, location of backups, and backup set name use:
mysql-zrm-reporter --destination /var/lib/mysql-zrm/backup --fields backup-date,backup-directory,backup-set
To display backup date, backup set name, and size of backup use:
mysql-zrm-reporter --destination /var/lib/mysql-zrm/backup --fields backup-date,backup-set,backup-size
To display size of backup, backup set name, and date of backup for "config1" backup set use:
mysql-zrm-reporter --destination /var/lib/mysql-zrm/backup --fields backup-date, backup-set, backup-size --where backup-set=config1
To display backup status report for "config1" backup set use:
mysql-zrm-reporter --destination /var/lib/mysql-zrm/backup --show backup-status-info --where backup-set=config1
To display backup status report for "config1" backup set in HTML format and write a file use:
mysql-zrm-reporter --destination /var/lib/mysql-zrm/backup --show backup-status-info --where backup-set=config1 --type html --output myreport.html
π FILES π
/var/lib/mysqlβzrmβ bestie, this is the folder. Every single bit of your backup data lives under here. All of it. Your whole backup world, chillin' in one directory. ποΈβ¨/etc/mysqlβzrm/mysqlβzrmβreporter.confβ the config file that themysql-zrm-reporterutility reads. Yeah, the reporter reads this one, so if something's looking weird, this is your girl. π
π€ RETURN VALUES π€
Okay so the vibe check on exit codes:
- On success, zero is returned. Clean. Iconic. No notes. β
- On error, a nonβzero value is returned. So if your script sees a nonzero, something went sideways, no cap. π¨
And the output split, which honestly matters so much:
- Output messages go to STDOUT.
- Error messages go to STDERR.
So if you're piping stuff around, remember: the good tea is on STDOUT and the messy drama is on STDERR. Keep them separate and you'll never be confused. π
π SEE ALSO π
π AUTHOR π
Zmanda Inc. (http://www.zmanda.com) β yeah, they made this whole thing. Respect. π«Ά
And that's a wrap on mysqlβzrmβreporter(1), bestie. This page comes to you from the ZRM for MySQL manual, written by Zmanda, Inc., and that footer you'd normally see at the bottom is literally just their name, the manual title and the section number β so consider this your cute lil sign-off instead. π Go forth, report on those backups, and stay hydrated. π¦πΈ
π¦ where this page comes from
- epel 9: MySQL-zrm 3.0-38.el9 Β· GPLv2
- fedora 43: MySQL-zrm 3.0-44.fc43 Β· GPL-2.0-only
- fedora 44: MySQL-zrm 3.0-46.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms