FW: [Snort-users] Mysql archive question?

Hutchinson, Andrew Andrew.Hutchinson at ...3639...
Mon Nov 12 10:26:03 EST 2001

The data that you're trying to load already exists in the archive
database, and you're trying to write a unique index record when a record
with the same unique key is already there.

I would have to know how you're dumping the data to files to know
exactly why this is happening, but you'll need to do one of the
following for it to work right:

Solution 1:
1. Perform complete database dump.
2. Purge data from tables in production database.
3. Load data to archive database.

This will ensure that there is no data collision between the databases.
If you don't purge the production data, then the next time you dump and
load, you'll be loading unique values that already exist.

Solution 2:
1. Create a field or table in the production database that tracks which
records have been archived, and write a custom script to dump the data
that updates this field or table.  This will be slower.
2. Load only the un-archived data into the archive database.

Solution 2 is more complex, and probably defeats the purpose of
archiving in the first place - reducing the size of the production
database to increase performance.

Hope this helps.

Andrew Hutchinson CNE MCSE
Informatics/NCS/Network Security
Vanderbilt University Medical Center
615.936.2856 - voice
615.936.0643 - fax
andrew.hutchinson at ...3295...

>  -----Original Message-----
> From: 	snort-users-admin at lists.sourceforge.net@VANDERBILT   On
> Behalf Of Vjay LaRosa <vjayl at ...3331...>
> Sent:	Monday, November 12, 2001 10:03 AM
> To:	snort-users at lists.sourceforge.net
> Subject:	[Snort-users] Mysql archive question?
> Hello, 
> I seem to be having a problem archiving data in Mysql. When ever I
> dump the data out to files, then try and 
> load it in to my archive data base I always get these errors. 
> DBD::mysql::st execute failed: Duplicate entry '4-1266285' for key 1
> at ./arc-load.pl line 31. 
> DBD::mysql::st execute failed: Duplicate entry '4-1266285' for key 1
> at ./arc-load.pl line 31. 
> Can any one tell me what might be the problem? Thanks! 
> vjl 
> -- 
>  V.Jay LaRosa                           EMC Corporation
>  Systems Administrator                  171 South Street
>  (508)435-1000 ext 14957                Hopkinton, MA 01748
>  (508)497-8082 fax                      www.emc.com

More information about the Snort-users mailing list