Page 1 of 1

Database Restore Error

Posted: Tue Dec 23, 2008 4:24 am
by mklenner
Your board's URL: http://jnestlerode.ipower.com/phpBB/index.php
Version of phpBB2: 2.0.20
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Host Migration
Did you use an automated wizard provided by your host to install phpBB? No
MODs you have installed: None
When the problem started: Restore of Database
Your level of expertise (be honest): Intermediate
Template(s) used: Subsilver
Language(s) used: English
Version of PHP used: 4.4.7
Database and version used: mySQL 5.045

Okay... I've been asked to help someone migrate to a new host, and I installed phpBB 2.0.20 for parity. I will upgrade to phpBB3 at some point soon, but the old hose will be going dark soon, and I need to get things sorted out. I used the Backup Database on the old system, installed phpBB2 on the new one, and tried to do a restore. I get the following error:

Code: Select all

Error importing backup file

DEBUG MODE

SQL Error : 1062 Duplicate entry 'charts' for key 1

INSERT INTO phpbb_search_wordlist (word_text, word_id, word_common) VALUES('charts', '3785', '0')

Line : 980
File : admin_db_utilities.php
I've been through the archives and found no answers. The auto increments appear to be fine.

Suggestions?

Re: Database Restore Error

Posted: Tue Dec 23, 2008 5:02 am
by ric323
Probably you have a different "collation" setting on the old and new databases, so accented characters are getting converted to the unaccented equivalent, making some of the words in the search tables appear the same.

The easiest solution is to delete all the search tables from the backup file (using a text editor which can handle large files). These make up about 50% of the data in the file, and are the three tables which have "search_" in their name.
(phpbb_search_results, phpbb_search_wordlist, and phpbb_search_wordmatch)

If you are going to go straight to phpBB3 without making the database live, then don't worry about the search tables.
If you want to go live with the phpBB2 board, then you would need to rebuild the seac index using this MOD
http://www.phpbb.com/community/viewtopic.php?t=329629