FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Data dump import issues
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Data dump import issues [message #4291] Sun, 21 July 2002 23:17 Go to next message
rohan is currently offline  rohan   Australia
Messages: 4
Registered: July 2002
Karma: 0
Junior Member
When trying to restore a datadump made by FUDforum2 20020704, using mysql version 3.23.51 (from debian), I had to change the INSERT querys in the data dump to REPLACE querys to get mysql to accept it (otherwise it complained about duplicate entries).
Is this something to do with my version of mysql, or something else?

Rohan
Re: Data dump import issues [message #4293 is a reply to message #4291] Mon, 22 July 2002 01:51 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The problem would have occured if for some reason the dump script was unable to read the files inside the sql directory of the forum where forum table defenitions are stored.
These used to re-create the tables, since the original tables would get dropped.


FUDforum Core Developer
Re: Data dump import issues [message #4294 is a reply to message #4293] Mon, 22 July 2002 06:12 Go to previous messageGo to next message
rohan is currently offline  rohan   Australia
Messages: 4
Registered: July 2002
Karma: 0
Junior Member
There was no error of not being able to open a file. The error was instead that it could not insert data into the database because it would not overwrite. For example, it gave the error:
query failed: %( INSERT INTO fud21_custom_tags (id,name,user_id) VALUES(1,"Administrator",1) )% because %( Duplicate entry '1' for key 1 )%

because on installation that row had been added to the database, and it didnt want to overwrite it.

I have also not been able to restore the files, because the script is reading a leading '/' onto the size of files, and is therefore writing all files as size 0. It seems this is because many filenames in the datadump have leading '/'s, which are picked up as the delimiter, and the next slash is read as part of the size. Also, many files have a trailing ".t", which means many files are created with that in their names. For example, from the data dump:
----SQL_END----
//isearch.inc.t//DATA_DIRsrc///7845//
<?php
/************************************************************************** *
* copyright : (C) 2001,2002 Advanced Internet Designs Inc.
* email : forum(at)prohost(dot)org
*

Rohan
Re: Data dump import issues [message #4295 is a reply to message #4294] Mon, 22 July 2002 06:30 Go to previous messageGo to next message
rohan is currently offline  rohan   Australia
Messages: 4
Registered: July 2002
Karma: 0
Junior Member
I think the problem with the file restoration is to do with the data dump, not the restoring routine.

Rohan
Re: Data dump import issues [message #4297 is a reply to message #4295] Mon, 22 July 2002 12:07 Go to previous message
rohan is currently offline  rohan   Australia
Messages: 4
Registered: July 2002
Karma: 0
Junior Member
I managed to get the datadump to import by the following method:
1) Replace INSERT with REPLACE in the SQL section
2) Add the following line to the import script after the size has been read from the file:
$size = strtok($size, '/');
3) Rename all files in the forum/src directory to remove trailing ".t"

Rohan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: moderated forums
Next Topic: Moderation Queu & Deleted Forums
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 16:36:47 GMT 2024

Total time taken to generate the page: 0.02802 seconds