Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL Backup Problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Sakkath
Apprentice
Apprentice


Joined: 06 Nov 2005
Posts: 198
Location: Pawtucket, RI

PostPosted: Fri May 11, 2007 12:07 pm    Post subject: MySQL Backup Problems Reply with quote

I have a backup script that someone from #gentoo gave me; it was working fine but now I am getting e-mails saying:
Code:
 mysqldump: Got error: 1016: Can't open file: './xklark_ipb/tarball_contacts.frm' (errno: 24) when using LOCK TABLES

There was another error too but I accidentally deleted the e-mail.
_________________
The person who makes no mistakes does not usually make anything.

Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Back to top
View user's profile Send private message
blackcollar
n00b
n00b


Joined: 23 Jul 2003
Posts: 39
Location: /usa/idaho

PostPosted: Fri May 11, 2007 12:59 pm    Post subject: Reply with quote

Something to check, from a Google search on that error:

Some versions of mysqldump cannot handle over 330 tables. Do you have more than 300? If so, you might try adding
Code:
--open-files-limit=#
to the end of the command line within the script, where # is 2048 for Windows (the max allowed) and 8192 on some versions of Linux (SuSE, at least). To check the current number of open files, use

Code:
show variables like '%open_f%';


Ref:
[*] http://bugs.mysql.com/bug.php?id=21782
[*] http://www.google.com/group/mailing.database.myodbc/t/65479ba5981b680/a95884712d70ed86%23a95884712d70ed86?sa=X&oi=groups&ct=result&cd=1
_________________
mcm
Back to top
View user's profile Send private message
Sakkath
Apprentice
Apprentice


Joined: 06 Nov 2005
Posts: 198
Location: Pawtucket, RI

PostPosted: Sat May 12, 2007 2:18 am    Post subject: Reply with quote

Is that 330 per database?
Code:
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| innodb_open_files | 300   |
| open_files_limit  | 1024  |
+-------------------+-------+
2 rows in set (0.00 sec)

_________________
The person who makes no mistakes does not usually make anything.

Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Back to top
View user's profile Send private message
blackcollar
n00b
n00b


Joined: 23 Jul 2003
Posts: 39
Location: /usa/idaho

PostPosted: Sat May 12, 2007 3:58 am    Post subject: Reply with quote

As I read the documents I linked to, I believe it's a limit on the total number of files opened by the script. So adjusting that parameter within the script should allow at least twice as many open files (Windows, 8x for Linux).

I'm not an expert at SQL, just good with search engines.

MCM
_________________
mcm
Back to top
View user's profile Send private message
Sakkath
Apprentice
Apprentice


Joined: 06 Nov 2005
Posts: 198
Location: Pawtucket, RI

PostPosted: Sat May 12, 2007 1:14 pm    Post subject: Reply with quote

Oh, I'm sorry you did the work for me, I probably would have but I was very tired last night and fell asleep. Thank you.

By script do you mean 'mysqldump' or my backup script?

I read the links you gave me and I'm going to try raising that variable right now. Thank you again.
_________________
The person who makes no mistakes does not usually make anything.

Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Back to top
View user's profile Send private message
Sakkath
Apprentice
Apprentice


Joined: 06 Nov 2005
Posts: 198
Location: Pawtucket, RI

PostPosted: Sat May 12, 2007 1:22 pm    Post subject: Reply with quote

Okay, it's changed; now I'll wait for my cronjob to kick in and update you guys later whether or not it erred or not. Thanks a lot! I'm sorry that I didn't think to Google this first, I thought it might be a weird filesystem error, corruption, etc.
_________________
The person who makes no mistakes does not usually make anything.

Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum