[Baruwa] Duplicate Entry

15 views
Skip to first unread message

Kleber Rocha

unread,
Feb 28, 2012, 3:01:47 PM2/28/12
to Baruwa users list
Hi,

I have many errors like:

Duplicate entry '7AF82AC3AF1.A5D3F' for key 'PRIMARY' error 1062 recorded: Duplicate entry '7AF82AC3AF1.A5D3F' for key 'PRIMARY'


How can I fix this?

Thanks

Jeremy McSpadden

unread,
Feb 28, 2012, 3:03:51 PM2/28/12
to Baruwa users list, Baruwa users list
Export the table, then reimport. Will re-index on import.


--
Jeremy McSpadden

> _______________________________________________
> Keep Baruwa FREE - http://pledgie.com/campaigns/12056

_______________________________________________
Keep Baruwa FREE - http://pledgie.com/campaigns/12056

Kleber Rocha

unread,
Feb 28, 2012, 3:25:16 PM2/28/12
to Baruwa users list
Jeremy,

Thanks for the reply.

But this table has 24GB, how can I avoid this issue?

Thanks.


2012/2/28 Jeremy McSpadden <jer...@fluxlabs.net>

Jeremy McSpadden

unread,
Feb 28, 2012, 3:30:48 PM2/28/12
to Baruwa users list, Baruwa users list
You can't. Unless you want to go ID by ID .. And manually delete them. I'm pretty sure you'll have more than a few. 

Why is your DB 24gb? Why don't you archive the database 


--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 3:34:18 PM2/28/12
to Baruwa users list
How can I archive this?

Thanks

2012/2/28 Jeremy McSpadden <jer...@fluxlabs.net>

Jeremy McSpadden

unread,
Feb 28, 2012, 3:35:39 PM2/28/12
to Baruwa users list, Baruwa users list
Export and start over :)


--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 3:37:44 PM2/28/12
to Baruwa users list
I don't understanding, I have to create dump? how can I export this table?

Jeremy McSpadden

unread,
Feb 28, 2012, 3:43:22 PM2/28/12
to Baruwa list
mysqldump –uUSER –pPASSWORD DBNAME > /tmp/backup.sql

Login to mysql
drop database DBNAME;
create database DBNAME;
Logout

mysql –uUSER-pPASSWORD DBNAME < /tmp/backup.sql


Problem you'll run out of memory real quick doing this import. 24gb db file .. good luck with that

--
Jeremy McSpadden
Flux Labs, Inc
http://www.fluxlabs.net
Endless Solutions
Office : 850-588-4626
Cell : 850-890-2543
Fax : 850-254-2955

Kleber Rocha

unread,
Feb 28, 2012, 3:47:25 PM2/28/12
to Baruwa users list
I understanding the export, but how can I archive messages tables, to avoid that table growing?
Rename table and create new table with the properties of old table?

Jeremy McSpadden

unread,
Feb 28, 2012, 3:50:09 PM2/28/12
to Baruwa list
That is one way. You may also have it the upper limit of your auto_increment. 

Mikael Syska

unread,
Feb 28, 2012, 3:51:40 PM2/28/12
to Baruwa users list

Kleber Rocha

unread,
Feb 28, 2012, 5:01:01 PM2/28/12
to Baruwa users list
Why this happens?

Feb 28 07:14:17 napmail01 MailScanner[30376]: Baruwa: Sending message 102DEAC33CA.A8F82 to server failed, using backup
Feb 28 07:14:17 napmail01 MailScanner[30376]: Baruwa: 102DEAC33CA.A8F82: Logged using backup DB

The MySQL server is ok and running.

Thanks



2012/2/28 Mikael Syska <mik...@syska.dk>

Jeremy McSpadden

unread,
Feb 28, 2012, 5:02:49 PM2/28/12
to Baruwa users list, Baruwa users list
Looks like its not ok. Have you checked the db? 


to server failed, using backup

--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 5:05:24 PM2/28/12
to Baruwa users list
[root@napmail01 tmp]# mysqlcheck -u root baruwa
baruwa.archive                                     OK
baruwa.auth_group                                  OK
baruwa.auth_group_permissions                      OK
baruwa.auth_hosts                                  OK
baruwa.auth_message                                OK
baruwa.auth_permission                             OK
baruwa.auth_user                                   OK
baruwa.auth_user_groups                            OK
baruwa.auth_user_user_permissions                  OK
baruwa.celery_taskmeta                             OK
baruwa.celery_tasksetmeta                          OK
baruwa.deliveryinfo                                OK
baruwa.django_content_type                         OK
baruwa.django_session                              OK
baruwa.djcelery_crontabschedule                    OK
baruwa.djcelery_intervalschedule                   OK
baruwa.djcelery_periodictask                       OK
baruwa.djcelery_periodictasks                      OK
baruwa.djcelery_taskstate                          OK
baruwa.djcelery_workerstate                        OK
baruwa.domain_signatures                           OK
baruwa.lists                                       OK
baruwa.mail_hosts                                  OK
baruwa.mailq                                       OK
baruwa.message_recipients                          OK
baruwa.messages                                    OK
baruwa.profiles                                    OK
baruwa.quarantine_releases                         OK
baruwa.report_filters                              OK
baruwa.sa_rules                                    OK
baruwa.scanner_config                              OK
baruwa.scanner_config_sections                     OK
baruwa.scanners                                    OK
baruwa.signature_imgs                              OK
baruwa.south_migrationhistory                      OK
baruwa.user_addresses                              OK
baruwa.user_signatures                             OK


2012/2/28 Jeremy McSpadden <jer...@fluxlabs.net>

Jeremy McSpadden

unread,
Feb 28, 2012, 5:06:51 PM2/28/12
to Baruwa users list, Baruwa users list
Looks ok. Now check logs as to why. What does debug output? 


--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 5:10:10 PM2/28/12
to Baruwa users list
Only these erros of perl.


In Debugging mode, not forking...
Trying to setlogsock(unix)
Building a message batch to scan...
Have a batch of 1 message.
Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/File.pm line 185.
Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/File.pm line 185.
Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/File.pm line 188.
Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/File.pm line 185.
Insecure dependency in open while running with -T switch at /usr/lib64/perl5/IO/File.pm line 185.
Stopping now as you are debugging me.

Jeremy McSpadden

unread,
Feb 28, 2012, 5:11:51 PM2/28/12
to Baruwa users list
Add -U to your mailscanner # line. 


--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 5:13:49 PM2/28/12
to Baruwa users list
Yes, already added, the error happens anyway.

2012/2/28 Jeremy McSpadden <jer...@fluxlabs.net>

Jeremy McSpadden

unread,
Feb 28, 2012, 5:15:33 PM2/28/12
to Baruwa users list, Baruwa users list
What flavor of Linux? Version?


--
Jeremy McSpadden

Kleber Rocha

unread,
Feb 28, 2012, 5:18:47 PM2/28/12
to Baruwa users list
Scientific Linux 6.2



2012/2/28 Jeremy McSpadden <jer...@fluxlabs.net>
Reply all
Reply to author
Forward
0 new messages