Mani's Blog

March 30, 2012

xtrabackup: Fatal error: cannot find ./xtrabackup_logfile

Filed under: MySQL,Xtrabackup — mani @ 4:37 pm

We have a process to validate our backup every quarter.  I ran into following errors on one of the databases.  Did enough search to figure out the solution, initially thought it could be an xtrabackup bug.  Then turn out to be we were holding incomplete xtrabackup.  Backup failed quietly since there was another etl process running at the same time, due to heavy load and lock on the tables backup process died.

We are really lucky that we were able to catch it during the validation.   We have rescheduled the ETL job and added more checks to the backup monitoring.

Errors:

120228 19:25:55 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup –prepare –target-dir=/local/mysql/data

xtrabackup Ver 1.0 Rev 113 for 5.0.84 unknown-linux-gnu (x86_64)
xtrabackup: cd to /local/mysql/data
xtrabackup: Error: cannot open ./xtrabackup_checkpoints
xtrabackup: error: xtrabackup_read_metadata()
xtrabackup: This target seems not to have correct metadata…
120228 19:25:55 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find.
120228 19:25:55 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Fatal error: cannot find ./xtrabackup_logfile.
xtrabackup: Error: xtrabackup_init_temp_log() failed.
innobackupex-1.5.1: Error:
innobackupex-1.5.1: ibbackup failed at /usr/bin/innobackupex-1.5.1 line 464.

Advertisements

InnoDB: Database page corruption on disk or a failed

Filed under: MySQL — mani @ 4:20 pm

I  ran into Database page corruption  error while I was restoring MySQL Xtrabackup.  Tried previous day backup then same errors.

Errors:

InnoDB: End of page dump
120329 17:59:38 InnoDB: Page checksum 1255360450, prior-to-4.0.14-form checksum 1044442903
InnoDB: stored checksum 1255360450, prior-to-4.0.14-form stored checksum 1429906423
InnoDB: Page lsn 512 461193189, low 4 bytes of lsn at page end 461874216
InnoDB: Page number (if stored to page already) 964,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 411
InnoDB: Page may be an index page where index id is 0 853
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 964.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
innobackupex-1.5.1: Error:
innobackupex-1.5.1: ibbackup failed at /usr/bin/innobackupex-1.5.1 line 464.

Solution:

Edit the file /etc/my.cnf and add parameter or variables  innodb_force_recovery=2 then apply the logs.  Everything went well.

Edit the file /etc/my.cnf and comment or remove innodb_force_recovery=2 then restart the mysql.

This seems to be fixed the issue.

 

Blog at WordPress.com.