Backups failed. What do I do?

From wiki.zmanda.com
Jump to navigation Jump to search

MySQL ZRM logs are available under /var/log/mysql-zrm directory on the machine where MySQL ZRM is running. All backup and recovery operations, status of these operations are logged. These logs can be used for debugging in case of failures as well as auditing backup/recovery database operations.

Subsystems Log file name
mysql-zrm, Pre-Backup plugin, Post-Backup plugin, Binary log parser plugin, Copy plugin mysql-zrm.log
mysql-zrm-reporter mysql-zrm-reporter.log
mysql-zrm-scheduler mysql-zrm-scheduler.log
Pre scheduler plugin zrm-pre-scheduler.log

For more information on plugins, please see Custom plugins section.

Example: mysql-zrm log file entries from a succesful restore of incremental backup. This annotation of log file shows how to read the log files.

Wed Aug 30 02:39:48 2006: INFO: mysql-zrm started

All the MySQL backup runs starts with "mysql-zrm started" message.

Wed Aug 30 02:39:48 2006: INFO: action being performed is restore
Wed Aug 30 02:39:48 2006: INFO: backup set being used is backup

Above lines show the list of command line parameters to mysql-zrm

Wed Aug 30 02:39:48 2006: INFO: Reading options from file /etc/mysql-zrm/backup/mysql-zrm.conf
Wed Aug 30 02:39:48 2006: INFO: Mail address: root is ok
Wed Aug 30 02:39:48 2006: INFO: Input Parameters Used {
Wed Aug 30 02:39:48 2006: INFO:         verbose=1
Wed Aug 30 02:39:48 2006: INFO:         backup-level=1
Wed Aug 30 02:39:48 2006: INFO:         mailto=root
Wed Aug 30 02:39:48 2006: INFO:         destination=/mysql-zrm
Wed Aug 30 02:39:48 2006: INFO:         databases=wikidb
Wed Aug 30 02:39:48 2006: INFO:         source-directory=/mysql-zrm/backup/20060830020843
Wed Aug 30 02:39:48 2006: INFO:         host=localhost
Wed Aug 30 02:39:48 2006: INFO:         database=wikidb
Wed Aug 30 02:39:48 2006: INFO:         backup-mode=raw
Wed Aug 30 02:39:48 2006: INFO:         password=******
Wed Aug 30 02:39:48 2006: INFO:         user=root
Wed Aug 30 02:39:48 2006: INFO:         stop-position=5003
Wed Aug 30 02:39:48 2006: INFO: }

The above lines show the list of parameters used for restore operation

Wed Aug 30 02:39:48 2006: INFO: Getting the data directory
Wed Aug 30 02:39:48 2006: INFO: mysqladmin --user=root --password=***** --host=localhost variables
2> /tmp/mysql-zrm-20060830023948.out
Wed Aug 30 02:39:48 2006: INFO: datadir is /var/lib/mysql/
Wed Aug 30 02:39:48 2006: INFO: mysql_version is 4.1.21-standard-log
Wed Aug 30 02:39:48 2006: INFO: Checking if this is a replication slave using command
Wed Aug 30 02:39:48 2006: INFO: echo "show slave status"|mysql --user=root --password=***** --host=localhost
Wed Aug 30 02:39:48 2006: INFO: This is not a replication slave or we do not have appropriate access rights.
 replication data if any has not been backed up.
Wed Aug 30 02:39:48 2006: INFO:  Ignoring the --replication option

The above lines show validation of backup parameters

Wed Aug 30 02:39:48 2006: INFO: Restoring incremental
Wed Aug 30 02:39:48 2006: INFO: mysqlbinlog --user=root --password=***** --host=localhost --stop-position=5003 
--database=wikidb "/mysql-zrm/backup/20060830020843"/vmsql4-bin.[0-9]* | mysql --user=root --password=***** 
--host=localhost
Wed Aug 30 02:39:48 2006: INFO: Incremental restore done

Incremental restoration is complete

Wed Aug 30 02:39:48 2006: INFO:  for database wikidb
Wed Aug 30 02:39:48 2006: INFO:
Wed Aug 30 02:39:48 2006: INFO: Shutting down MySQL
Wed Aug 30 02:39:53 2006: INFO: Restore done in 5 seconds.

MySQL server is shutdown after database restoration.