Mysql-zrm-reporter: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
No edit summary
 
Line 17: Line 17:


The list of information available for each backup run:
The list of information available for each backup run:
; backup-set : Name of the Backup Set


; backup-date : Date and time stamp of Backup
; backup-date : Date and time stamp of Backup
Line 26: Line 24:
; backup-directory : The location of backup directory
; backup-directory : The location of backup directory


; backup-level : Backup level (full or incremental)
; backup-level : Lists the backup-level of this backup. It will be 0 for a full backup and 1 for an incremental backup
 
; raw-databases : List of databases backed up using ''mysqlhotcopy''. If raw-tables are present, this will have only one database listed.


; raw-databases : List of databases that have raw backups
; raw-databases(snapshot): List of tables backed up. Refer to the raw-databases(snapshot) entry to find the name of the database these tables belongs to.
; backup-time : Gives the time taken for the backup to complete. Format is HH:MM:SS


; backup-time : Time taken to do the backup
; backup-date-epoch : Lists the time stamp of the backup run in seconds since epoch


; backup-size : Size of backup
; backup-size : Gives the size of backup data in megabytes.


; next-binlog : Next binary log file name
; next-binlog : Gives the name of next bin log that should be used for the next incremental backup


; last-backup : Location of the last backup for this backup set
; last-backup : Gives the name of the directory containing the previous backup


; backup-status : Status  of the backup run. The values can be "Backup Failed", "Backup done with errors", "Backup succeeded".
; backup-status : Gives the status of the backup run. It can have 3 values. The values can be ''Backup Failed'' which indicates that there was a fatal error, ''Backup done with errors'' which indicates that there was some error during backup. Some of the databases and tables were probably backed up and ''Backup succeeded'' which indicates that the backup run was completed successfully.


; raw-tables(snapshot) : List of tables backed up using LVM snapshots
; raw-tables(snapshot) : List of tables backed up using LVM snapshots
Line 48: Line 50:
; logical-tables : List  of  tables  belonging  to "logical-databases" backed up using mysqldump(1)
; logical-tables : List  of  tables  belonging  to "logical-databases" backed up using mysqldump(1)


; replication : Names of replication files that were backed up
; replication : List of names of the replication files backedup namely master.info and relay-log.info
 
; read-locks-time : Time during which the read lock is held for each backup run. Format is HH:MM:SS
 
; flush-logs-time : Time for flushing database pages to the disk. Format is HH:MM:SS


; slave-load-files : Names of SQL_LOAD* files that were backed up
; slave-load-files : Names of SQL_LOAD* files that were backed up
; incremental : List of names of the bin log files backedup.
; backup-set : Lists the backup-set this backup belongs to
; comment : Lists the comment that was given to the mysql-zrm utility
; retention-policy : Data retention-policy value, Data will be retained for the time specified as parameter. Time value can be in Days/Weeks/Months. For e.g. if retention-policy=10M indicates that the backup should be retained for 300 days.  retention-policy 10H indicates that the backup should be retained for 10 hours. If no suffix is specified, the amount specified is assumed to be number of days the backup should be retained.


==OPTIONS==
==OPTIONS==

Revision as of 21:42, 7 September 2006

NAME

mysql-zrm-reporter - MySQL backup reporting tool.

SYNOPSIS

mysql-zrm-reporter --fields <name1,name2,name3 ....>
                   [--directory <dir> ] 
                   [--key <name=value>]
                   [--help]

DESCRIPTION

This tool is part of Zmanda Recovery Manager for MySQL (MySQL ZRM). This tool can be used to display various information regarding MySQL database backups created using mysql-zrm(1) tool.

BACKUP INFORMATION

The list of information available for each backup run:

backup-date
Date and time stamp of Backup
mysql-version
MySQL server version
backup-directory
The location of backup directory
backup-level
Lists the backup-level of this backup. It will be 0 for a full backup and 1 for an incremental backup
raw-databases
List of databases backed up using mysqlhotcopy. If raw-tables are present, this will have only one database listed.
raw-databases(snapshot)
List of tables backed up. Refer to the raw-databases(snapshot) entry to find the name of the database these tables belongs to.
backup-time
Gives the time taken for the backup to complete. Format is HH:MM:SS
backup-date-epoch
Lists the time stamp of the backup run in seconds since epoch
backup-size
Gives the size of backup data in megabytes.
next-binlog
Gives the name of next bin log that should be used for the next incremental backup
last-backup
Gives the name of the directory containing the previous backup
backup-status
Gives the status of the backup run. It can have 3 values. The values can be Backup Failed which indicates that there was a fatal error, Backup done with errors which indicates that there was some error during backup. Some of the databases and tables were probably backed up and Backup succeeded which indicates that the backup run was completed successfully.
raw-tables(snapshot)
List of tables backed up using LVM snapshots
raw-tables
List of tables backed up using mysqlhotcopy
logical-databases
List of databases backed up using mysqldump(1)
logical-tables
List of tables belonging to "logical-databases" backed up using mysqldump(1)
replication
List of names of the replication files backedup namely master.info and relay-log.info
read-locks-time
Time during which the read lock is held for each backup run. Format is HH:MM:SS
flush-logs-time
Time for flushing database pages to the disk. Format is HH:MM:SS
slave-load-files
Names of SQL_LOAD* files that were backed up
incremental
List of names of the bin log files backedup.
backup-set
Lists the backup-set this backup belongs to
comment
Lists the comment that was given to the mysql-zrm utility
retention-policy
Data retention-policy value, Data will be retained for the time specified as parameter. Time value can be in Days/Weeks/Months. For e.g. if retention-policy=10M indicates that the backup should be retained for 300 days. retention-policy 10H indicates that the backup should be retained for 10 hours. If no suffix is specified, the amount specified is assumed to be number of days the backup should be retained.

OPTIONS

--directory <dir>
Specify the backup root directory, default value is /var/lib/mysql-zrm
--fields <name1,name2,name3...>
Specify list of backup parameters to display. List of field names are described in BACKUP INFORMATION section.
--key <name=value>
The tool will display the MySQL backup parameters where the key matches value.
--help
Display help message and exit.

EXAMPLES

Following command displays backup date, location of backups, backup set name:

# mysql-zrm-reporter --directory /var/lib/mysql-zrm/backup --fields backup-date,backup-directory,backup-set

Following command displays size of backup, backup set name, and date of backup:

# mysql-zrm-reporter --directory /var/lib/mysql-zrm/backup --fields backup-date,backup-set,backup-size

Following command searches all index files for "config1" backup-set name and displays size of backup, backup set name and date of backup

# mysql-zrm-reporter --directory /var/lib/mysql-zrm/backup --fields backup-date,backup-set,backup-size \
  --key backup-set=config1

FILES

/var/lib/mysql-zrm
Directory under which all backup data is stored.
/etc/mysql-zrm/<backup set name>/mysql-zrm.conf
Configuration file read by mysql-zrm tool.

RETURN VALUES

On success, zero is returned. On error, non-zero value is returned.

SEE ALSO

mysql-zrm(1), mysql-zrm-scheduler(1), mysql(1)

AUTHOR

Zmanda Inc. (http://www.zmanda.com)