Bug #30786 innobackup fails with ERROR 1005 (errno: 121)

Submitted: 4 Sep 2007 9:54 Modified: 5 Sep 2007 12:36
Reporter: Elan Ruusamäe (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:1.3.0 OS:Linux (PLD Linux)
Assigned to: Pekka Lampio CPU Architecture:Any
Tags: ibbackup, innobackup

[4 Sep 2007 9:54] Elan Ruusamäe
Description:
innobackup.pl dies as the creation of mysql/ibbackup_binlog_marker.frm table fails. that table doesn't exist before neither after creating snapshot.

i also tried to disable binlog creation of that table as tought it's related, but no success.

# innobackup --version
InnoDB Backup Utility v1.3.0; Copyright 2003-2005 Innobase Oy
# ibbackup --version
InnoDB Hot Backup version 3.0.0; Copyright 2002-2005 Innobase Oy
# uname -m
x86_64

How to repeat:
# innobackup /etc/mysql/mysqld.conf --no-timestamp /var/lib/mysql/innobackup
...

innobackup: Error: mysql child process has died: ERROR 1005 (HY000) at line 7: Can't create table './mysql/ibbackup_binlog_marker.frm' (errno: 121)
 while waiting for reply to MySQL request: 'CREATE TABLE ibbackup_binlog_marker(a INT) TYPE=INNODB;' at /usr/bin/innobackup line 342.
[4 Sep 2007 9:56] Elan Ruusamäe
console log of process failure

Attachment: innobackup.log (text/x-log), 3.12 KiB.

[4 Sep 2007 11:01] Sveta Smirnova
Thank you for the report.

InnoDB Backup Utility is product of Innobase Oy so better if you open this bug there.

But "ERROR 1005 (HY000) at line 7: Can't create table './mysql/ibbackup_binlog_marker.frm' (errno: 121)" can be MySQL error too. So, please, indicate accurate version of MySQL server you use.
[4 Sep 2007 11:48] Elan Ruusamäe
mysql-5.0.45-1.amd64
[4 Sep 2007 15:28] Heikki Tuuri
Elan,

error 121 means that the table mysql.ibbackup_binlog_marker already exists inside InnoDB's system tablespace though you do not have the .frm file  ibbackup_binlog_marker.frm in the /mysql database directory.

Have you used an earlier backup taken with the innobackup Perl script, but forgotten to put the .frm files to appropriate directories?

Regards,

Heikki
[4 Sep 2007 19:36] Elan Ruusamäe
Thanks. that seemed the cause of the problem. I think the problem appeared when was creating snapshot to update crashed slave and in the process i restored mysql database from slave, ie not using the mysql database from master due different GRANT options. However i looked the script and it seems to drop the mentioned table, so probably the innobackup run was interrupted or it failed by some other reason.

Here's how i solved the situation:

mysql> CREATE TABLE ibbackup_binlog_marker2(a INT) TYPE=INNODB;
Query OK, 0 rows affected, 1 warning (0.02 sec)

Warning (Code 1287): 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead

sh# mv mysql/ibbackup_binlog_marker{2,}.frm
sh# mysqladmin flush-tables

mysql> SET SQL_LOG_BIN = 0;
Query OK, 0 rows affected (0.00 sec)

mysql> DROP TABLE IF EXISTS ibbackup_binlog_marker;
Query OK, 0 rows affected (0.12 sec)
[5 Sep 2007 12:36] Heikki Tuuri
Elan, thank you. Restoring a backup is tricky because you have to remember all files, .frm and others.

Regards,

Heikki

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.