Results 1 to 7 of 7

Thread: Error during upgrade: Duplicate key name 'i_name'

  1. #1
    Join Date
    Oct 2005
    Posts
    13
    Rep Power
    10

    Default Error during upgrade: Duplicate key name 'i_name'

    I recevied this error when I upgraded my version of Zimbra. Anyone else have this problem? I'm going to restore my backup and try an incremental upgrade to see if that works.

    Code:
    Upgrading from 3.0.0_M2_746 to 3.1.0_GA_332
    Sat Apr 15 17:24:08 2006: Stopping zimbra services
    Sat Apr 15 17:24:11 2006: Checking mysql status
    Sat Apr 15 17:24:11 2006: Starting mysql
    Sat Apr 15 17:24:12 2006: SELECT value FROM config WHERE name = 'db.version'
    Sat Apr 15 17:24:13 2006: Checking logger mysql status
    Sat Apr 15 17:24:13 2006: Starting logger mysql
    This appears to be 3.0.0_M2
    Schema upgrade required
    Sat Apr 15 17:24:14 2006: Running /opt/zimbra/libexec/scripts/migrate20051021-UniqueVolume.pl
    Sat Apr 15 17:24:15 2006: SELECT value FROM config WHERE name = 'db.version'
    Sat Apr 15 17:24:15 2006: Verified schema version 21.
    Sat Apr 15 17:24:15 2006: Updating volume table
    Sat Apr 15 17:24:15 2006: ALTER TABLE volume
    ADD UNIQUE i_name (name),
    ADD UNIQUE i_path (path(255));
    
    
    ERROR 1061 (42000) at line 1: Duplicate key name 'i_name'
    Error while running '/opt/zimbra/bin/mysql --user=zimbra --password=vdDv4tC50MLqxfir_5NMQFklqIQ --database=zimbra --batch --skip-column-names'. at /opt/zimbra/libexec/scripts/Migrate.pm line 134,  line 1.
    Sat Apr 15 17:24:16 2006: Script failed with code 1 - exiting
    UPGRADE FAILED - exiting

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Seems you've got a dup path in the volume table. Can you login to MySQL manually and dump that table. Might have to remove a path to get the update to run.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Dec 2005
    Posts
    44
    Rep Power
    9

    Default M2

    That's the same error that I saw when upgrading from M2. I asked about it, but never got a response:
    http://www.zimbra.com/forums/showpos...1&postcount=10

    I was able to restore from a backup, upgrade to 3.0.1_GA_160, and then upgrade to 3.1.0_GA_260 successfully.

  4. #4
    Join Date
    Oct 2005
    Posts
    13
    Rep Power
    10

    Default

    I'll give that a try and see what happens. If it doesn't work, I'll look into what KevinH said.

    Quote Originally Posted by mubley
    That's the same error that I saw when upgrading from M2. I asked about it, but never got a response:
    http://www.zimbra.com/forums/showpos...1&postcount=10

    I was able to restore from a backup, upgrade to 3.0.1_GA_160, and then upgrade to 3.1.0_GA_260 successfully.

  5. #5
    Join Date
    Dec 2005
    Posts
    44
    Rep Power
    9

  6. #6
    Join Date
    Dec 2005
    Posts
    44
    Rep Power
    9

    Default migrate20051021-UniqueVolume.pl

    I've updated Bug 7385 with one possible solution.

  7. #7
    Join Date
    Dec 2005
    Posts
    44
    Rep Power
    9

    Default Workaround

    Quote Originally Posted by KevinH
    Seems you've got a dup path in the volume table. Can you login to MySQL manually and dump that table. Might have to remove a path to get the update to run.
    Here's the detail of how to implement KevinH's suggested workaround:

    NOTE: If you have already attempted to upgrade to 3.1, you will need to revert to a backup of your M2 installation before continuing.

    First, switch to the zimbra account:
    Code:
    su - zimbra
    Next, launch the mysql client utility:
    Code:
    mysql
    Tell mysql that you want to work on the zimbra database:
    Code:
    connect zimbra;
    Drop the index called i_name:
    Code:
    alter table volume
    drop index i_name;
    Drop the index called i_path:
    Code:
    alter table volume
    drop index i_path;
    Quit the mysql client utility:
    Code:
    quit
    Finally, switch back to the root account:
    Code:
    exit
    You should now be able to successfully upgrade from M2 to 3.1.

Similar Threads

  1. upgrade issues (4.0.2ga to 4.5.1ga)
    By tachijuan in forum Installation
    Replies: 3
    Last Post: 02-17-2007, 01:16 PM
  2. Certificate problem following 3.1.0 -> 4.0 upgrade
    By simonellistonball in forum Migration
    Replies: 5
    Last Post: 09-26-2006, 02:56 PM
  3. M1 -> M2 Upgrade Scripts
    By KevinH in forum Announcements
    Replies: 57
    Last Post: 12-15-2005, 10:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •