cannot import from backup file

Asked by kthamma

since I upgrade from 1.0.6 to 1.1.1 server and have a little bug about non standard port connected ..

I want to used 1.0.6 but I cannot import data from backup file (phpMyadmin , webmin , navicat etc.) all import program that I used will show error on table media

Error at the line 330461: ) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8;

Query: CREATE TABLE `media` (
`mediaID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`type` varchar(10) NOT NULL,
`duration` int(11) NOT NULL,
`originalFilename` varchar(254) DEFAULT NULL,
`storedAs` varchar(254) DEFAULT NULL COMMENT 'What has this media been stored as',
`MD5` varchar(32) DEFAULT NULL,
`FileSize` bigint(20) DEFAULT NULL,
`userID` int(11) NOT NULL,
`permissionID` tinyint(1) NOT NULL DEFAULT '1',
`retired` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Is retired?',
`isEdited` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Is this the current record',
`editedMediaID` int(11) DEFAULT NULL COMMENT 'The Parent ID',
PRIMARY KEY (`mediaID`),
KEY `permissionID` (`permissionID`),
CONSTRAINT `media_ibfk_1` FOREIGN KEY (`permissionID`) REFERENCES `permission` (`permissionID`)
) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8;

MySQL: Can't create table 'xibo.media' (errno: 150)

but the other table are OK ..

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Alex Harrington (alexharrington) said :
#1

What did you use to make the backup?

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
kthamma (k-dhammarat) said :
#2

Thanks Alex Harrington, that solved my question.

Revision history for this message
kthamma (k-dhammarat) said :
#3

I used backup file from automatic backup from upgrade ..

Revision history for this message
kthamma (k-dhammarat) said :
#4

Now I try more other program still same error ( mysqlFront , bigdump ) ..

Revision history for this message
Alex Harrington (alexharrington) said :
#5

Most programs that do SQL restores process the file line by line. That will never work for a Xibo database as it uses foreign key constraints.

You need to use mysql's own command line tool and restore using the source command.

http://wiki.xibo.org.uk/wiki/Release_Notes:Clone_Database#Method_1

If you skip step one there it'll show you what to do.

Also I wouldn't hold your breath that the backup you're using will actually restore. The automatic backup is there as an absolute last resort and I've had problems with it in the past - that's why in the release notes we suggest you take a backup using your own tools.

Alex

Can you help with this problem?

Provide an answer of your own, or ask kthamma for more information if necessary.

To post a message you must log in.