Backup failed!

When I try do a backup I got this error:

Creating backup for virtual server slave2.domain.info …

  Copying virtual server configuration ..
  .. done

  Backing up Cron jobs ..
  .. none defined.

  Saving mail aliases ..
  .. done

  Saving mail and FTP users ..
  .. done

  Backing up mail and FTP user Cron jobs ..
  .. none to backup

  Copying Apache virtual host configuration ..
  .. done

  Copying Apache log files ..
  .. done

  Copying Webalizer configuration files ..
  .. done

  Copying Logrotate configuration ..
  .. done

  Dumping MySQL database slave2 ..
  .. dump failed!

  mysqldump: Got error: 1016: Can't open file: './slave2/A_Selva_banner.frm' (errno: 24) when using LOCK TABLES

  Backup failed! See the progress output above for the reason why.

Please help me :slight_smile:

Howdy – have you by chance tried that more than once? I’m curious if it was a fluke, or an on-going issue.

Also, which Virtualmin version are you using?

Thanks,

-Eric

I tried many times, and always I got the same error, I have a large Data Base. So I think this could be the problem.

I am using the version 3.073.gpl

Thanks,

Okay.

Which Virtualmin version are you using?

And how large is that database?

-Eric

I am using Virtualmin version 3.073 GPL and my database is about 3.5 MB

Aha, ok, I’m not sure that’s large enough to be causing trouble…

Just yesterday, Virtualmin 3.71 came out. I’m curious if you continue to have that problem after upgrading to the new version, as they took care of several bugs in that release.

Thanks!

-Eric

I just done the upgrade for Virtualmin 3.71, however I still getting the same error. How could I stop using the “LOCK TABLES”?

Thanks :slight_smile:

Dumping MySQL database slave2 …
… dump failed!

mysqldump: Got error: 29: File ‘./slave2/A_Selva_banner.MYD’ not found (Errcode: 24) when using LOCK TABLES

Backup failed! See the progress output above for the reason why.

from mysql forums
mysqldump lock all the tables before finish the dump and it has some issues with databases with a lot of tables
You can force passing the --skip-lock-tables option to mysqldump or try increasing the open open_files_limit to 2x the size of the tables.

one even had success by simply rebooting the mysql server

Looks like there was an error opening one of the MySQL data files. Can you actually query that A_Selva_banner table, with a command like :

mysql -u root -p slave2 -e “select * from A_Selva_banner”

When I try the command mysql -u root -p slave2 -e “select * from A_Selva_banner”

I’m getting this error:

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

If I try force --skip-lock-tables in “MySQL server options”, after click on button save, the systems came back to the previous option.

But when I go to SSH and type the command

mysqldump --add-drop-table -h 127.0.0.1 -u slave2 -p slave2 --lock-tables=false | bzip2 -c > slave2.bak.sql.bz2

works fine, however I would like do this using Virtualmin

Thanks

Have a look at this page :

http://rackerhacker.com/2007/08/19/mysql-errcode-24-when-using-lock-tables/

It suggests that you hit the open files limit in MySQL, which can be increased by changing open_files_limit in /etc/my.cnf and restarting MySQL.

My /etc/my.cnf only has this information:

[mysqld]

datadir = /var/lib/mysql

socket = /var/lib/mysql/mysql.sock

user=mysql

old_passwords=1

set-variable = net_buffer_length=50G

set-variable = max_allowed_packet=50G

set-variable = myisam_sort_buffer_size=50G

set-variable = sort_buffer=50G

set-variable = key_buffer=50G

big-tables

big-tables

[mysqld_safe]

log-error=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

When I try change the open_files_limit using the Virtualmin (MySQL System Variables) I got this error:

SQL set global open_files_limit = 6144 failed : Unknown system variable ‘open_files_limit’

Thanks :slight_smile:

Howdy – what distribution are you using? And what does this command show:

mysql -V

Config File Format: open-files-limit = 6144

http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_open-files-limit