I ran into the "duplicate key" problem. I fixed it by doing the following:
updgrade MySQL past the buggy version.
for each _TABLE_; do: alter table _TABLE_ engine=InnoDB; alter table _TABLE_ engine=MyIsam; done
Not forcing MySQL to do a *TOTAL* rewrite of the tables seems to leave something *WRONG* in it from the buggy version. Running the alter table engine stuff forces total table rebuild from scratch vs just a repair which doesn't do that.
John Donagher wrote:
Hi All-
I've been using Bacula in a beta capacity for the past 6 months. I'm backing up now about 30 clients - mostly Solaris and Linux clients, with a few Windows/Mac OS X thrown in there. I've been quite happy except for one problem which I have had continually come back and haunt me.
It seems that the MySQL File table is particularly susceptible to corruption when a new client is backed up (Full) for the first time - I assume because of the huge number of inserts - or maybe there is some sort of concurrency issue, as I do run multiple jobs simultaneously.
An excerpt of the errors logged to the director are below..
Repairing the table through the MySQL console fixes the problem, but not the cause, as it always reappears.
I'm currently running the director/sd 1.36.2-1 on Debian Sarge, with the MySQL backend (4.0.23_Debian-4-log). I'm doing backups to disk, not tape.
The MySQL File table is currently about 721MB so I don't believe I'm running into any tablesize limits which I have found mention of in the archives.
I've searched bugs.bacula.org and the gmane list archives and don't find much mention of this problem.. it's also not 100% reproducible which makes it especially frustrating.
Can anyone shed any light on it or offer any potential solutions? Is it worth it to try switching to the PostgreSQL backend?
John
20-Apr 22:48 backup01-dir: No prior Full backup Job record found. 20-Apr 22:48 backup01-dir: No prior or suitable Full backup found. Doing FULL backup. 20-Apr 22:48 backup01-dir: Start Backup JobId 1666, Job=Backup-billing.2005-04-20_22.48.02 backup01-fd: File system change prohibited. Will not descend into /usr backup01-fd: File system change prohibited. Will not descend into /var/run backup01-fd: File system change prohibited. Will not descend into /dev/fd backup01-fd: File system change prohibited. Will not descend into /usr/local 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:564 sql_create.c:564 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70574,1666,4119,29088,'BVAAD EjDN IEk B A B A B/o CAA Q BCZlaM BAPL+U BAPL+j A A C','0') failed: Incorrect key file for table: 'File'. Try to repair it 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70574,1666,4119,29088,'BVAAD EjDN IEk B A B A B/o CAA Q BCZlaM BAPL+U BAPL+j A A C','0') failed. ERR=Incorrect key file for table: 'File'. Try to repair it20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: catreq.c:346 Attribute create error. sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70574,1666,4119,29088,'BVAAD EjDN IEk B A B A B/o CAA Q BCZlaM BAPL+U BAPL+j A A C','0') failed. ERR=Incorrect key file for table: 'File'. Try to repair it20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Error: Catalog error updating MD5/SHA1. sql_update.c:65 Update problem: affected_rows=0 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:564 sql_create.c:564 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70575,1666,4119,29089,'BVAAD EjDO IEk B A B A Bpf CAA O BCZlaM BAPL+U BAPL+j A A C','0') failed: Duplicate entry '21237005' for key 1 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70575,1666,4119,29089,'BVAAD EjDO IEk B A B A Bpf CAA O BCZlaM BAPL+U BAPL+j A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: catreq.c:346 Attribute create error. sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70575,1666,4119,29089,'BVAAD EjDO IEk B A B A Bpf CAA O BCZlaM BAPL+U BAPL+j A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Error: Catalog error updating MD5/SHA1. sql_update.c:65 Update problem: affected_rows=0 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:564 sql_create.c:564 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70576,1666,4119,28933,'BVAAD EjDP IGk B A B A GCR CAA y BCZlaM BAOivw BAOivw A A C','0') failed: Duplicate entry '21237005' for key 1 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70576,1666,4119,28933,'BVAAD EjDP IGk B A B A GCR CAA y BCZlaM BAOivw BAOivw A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: catreq.c:346 Attribute create error. sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70576,1666,4119,28933,'BVAAD EjDP IGk B A B A GCR CAA y BCZlaM BAOivw BAOivw A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Error: Catalog error updating MD5/SHA1. sql_update.c:65 Update problem: affected_rows=0 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:564 sql_create.c:564 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70577,1666,4119,28925,'BVAAD EjDQ IGk B A B A R5/ CAA CQ BCZlaM BAOivy BAOivy A A C','0') failed: Duplicate entry '21237005' for key 1 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70577,1666,4119,28925,'BVAAD EjDQ IGk B A B A R5/ CAA CQ BCZlaM BAOivy BAOivy A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: catreq.c:346 Attribute create error. sql_create.c:566 Create db File record INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70577,1666,4119,28925,'BVAAD EjDQ IGk B A B A R5/ CAA CQ BCZlaM BAOivy BAOivy A A C','0') failed. ERR=Duplicate entry '21237005' for key 120-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Error: Catalog error updating MD5/SHA1. sql_update.c:65 Update problem: affected_rows=0 20-Apr 22:59 backup01-dir: Backup-billing.2005-04-20_22.48.02 Fatal error: sql_create.c:564 sql_create.c:564 insert INSERT INTO File (FileIndex,JobId,PathId,FilenameId,LStat,MD5) VALUES (70578,1666,4119,406946,'BVAAD EjDR IGk B A B A C4B CAA Y BCZlaM BAOivy BAOivy A A C','0') failed: Duplicate entry '21237005' for key 1
------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users