Need help getting around this error on import:
Import failed. Check your server logs for more information. Hibernate operation: could not insert: com.atlassian.confluence.labels.Label#7930192; SQL ; Duplicate entry '7930192' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '7930192' for key 'PRIMARY'
Steps taken to get into this mess:
We imported a space from a space-export file, 100% successful.
The export used was determined to be old and contained outdated pages.
Space was deleted (this takes away longer than I thought it would...)
New export version was copied to server into the confluence-data/restore/ directory
Restore was attempted again via the admin interface, but fails at 44% with Unique Constraint error.
Read the following KB article: https://confluence.atlassian.com/display/CONFKB/Unable+to+Import+Space+due+to+Primary+Key+Constraint
Which seems to address the problem. When I grep the logs, there is only one key listed. I delete the space, delete the key (per the kb article) and re-do the import. It fails again, but with yet another key violation (different key this time). It seems like I'm going to have to keep trying this one key at a time. Since it takes almost an hour to delete the space, if there are more than a dozen of these keys, I'll be here for weeks.
Is there another way to get around this? Is there a way to find these orphaned keys before I do the import? Is there a way to sift the incoming keys from the import prior to using it to pre-check them?
Rich