Topic: help restoring database

I did a backup of my database (flux bb 1.2.18) with a plugin available on PunBB but i can't restore it. When i try in php my admin, nothing is happening. Can you help me please ?

Re: help restoring database

How big is your sql file, if it is to big then it can happen that nothing happens.

Re: help restoring database

it is 3mo large but I tried to gzip it at 522ko and nothing changed.

Re: help restoring database

Maby you can restore it in little bits?

Re: help restoring database

How to split the file ?

Re: help restoring database

I splited the file but when i tried to import it here is what i got :

CREATE TABLE `bans` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(200) collate latin1_german2_ci default NULL, `ip` varchar(255) collate latin1_german2_ci default NULL, `email` varchar(50) collate latin1_german2_ci default NULL, `message` varchar(255) collate latin1_german2_ci default NULL, `expire` int(10) unsigned default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci -- -- Table structure for categories -- DROP TABLE IF EXISTS `categories`;
MySQL déclare:

Couldn't create table: bans

No way to restore, help please.

Re: help restoring database

MisterAwesome wrote:

Couldn't create table: bans

Is that all it says? Usually it will give a reason why.

Re: help restoring database

That's all sad but it seems to find another reason for every files

Last edited by MisterAwesome (2008-06-03 21:57:19)

Re: help restoring database

http://www.ozerov.de/bigdump.php

Re: help restoring database

I tried her is what i got :

Error at the line 25: DROP TABLE IF EXISTS `categories`;

Query: CREATE TABLE `bans` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(200) collate latin1_german2_ci default NULL,
`ip` varchar(255) collate latin1_german2_ci default NULL,
`email` varchar(50) collate latin1_german2_ci default NULL,
`message` varchar(255) collate latin1_german2_ci default NULL,
`expire` int(10) unsigned default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
DROP TABLE IF EXISTS `categories`;


MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `categories`' at line 10

Stopped on error

Re: help restoring database

Could you paste the first 30 lines of your dump?

Re: help restoring database

-- SQL dump commenced at Aujourd'hui 20:39:29
-- Generated by PunBB Backup Plugin
-- Dumping database `db214573164` - Database type: mysql


--
-- Table structure for bans
--

DROP TABLE IF EXISTS `bans`;
CREATE TABLE `bans` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `username` varchar(200) collate latin1_german2_ci default NULL,
  `ip` varchar(255) collate latin1_german2_ci default NULL,
  `email` varchar(50) collate latin1_german2_ci default NULL,
  `message` varchar(255) collate latin1_german2_ci default NULL,
  `expire` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci

--
-- Table structure for categories
--

DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `cat_name` varchar(80) collate latin1_german2_ci NOT NULL default 'New Category',
  `disp_position` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)

Re: help restoring database

MisterAwesome wrote:

-- SQL dump commenced at Aujourd'hui 20:39:29
-- Generated by PunBB Backup Plugin
-- Dumping database `db214573164` - Database type: mysql


--
-- Table structure for bans
--

DROP TABLE IF EXISTS `bans`;
CREATE TABLE `bans` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `username` varchar(200) collate latin1_german2_ci default NULL,
  `ip` varchar(255) collate latin1_german2_ci default NULL,
  `email` varchar(50) collate latin1_german2_ci default NULL,
  `message` varchar(255) collate latin1_german2_ci default NULL,
  `expire` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci

--
-- Table structure for categories
--

DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `cat_name` varchar(80) collate latin1_german2_ci NOT NULL default 'New Category',
  `disp_position` int(10) NOT NULL default '0',
  PRIMARY KEY  (`id`)

God! Nothing is exist after that.

Just do what you are not sure. tongue
FluxBB.cn

Re: help restoring database

sorry ? He asked for the first 30 lines.

Re: help restoring database

Aha. The PunBB Backup Plugin is notorious for generating incorrect backups, missing important pieces of information. hmm
FIND

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci

REPLACE WITH

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;

throughout the whole file.

Re: help restoring database

I got this error now :

Error at the line 37: INSERT INTO categories VALUES ('1', 'La série Futurama', '1');

Query: CREATE TABLE `categories` (
`id` int(10) unsigned NOT NULL auto_increment,
`cat_name` varchar(80) collate latin1_german2_ci NOT NULL default 'New Category',
`disp_position` int(10) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
INSERT INTO categories VALUES ('1', 'La série Futurama', '1');

MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO categories VALUES ('1', 'La série Futurama', '1')' at line 7

Re: help restoring database

Ok iI fixed it and the import was successful. Still there's a problem. Everything have been restored exept the posts. They are in the database but they don't shows up on the forum hmm
If I click on a topic i got this "Bad request. The link you followed is incorrect or outdated."

Last edited by MisterAwesome (2008-06-05 17:35:05)

Re: help restoring database

If I remember correctly, it's because moved_to on the topics table is set to 0 when it shouldn't be.
Run the following queries:

alter table topics change moved_to moved_to INT(10) UNSIGNED
update topics set moved_to = null where moved_to=0

Re: help restoring database

requête SQL:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update topics set moved_to = null where moved_to=0' at line 2

Anyway Moved seems to be at null :

moved_to       int(10)             UNSIGNED      Yes    NULL       

But not working hmm

Last edited by MisterAwesome (2008-06-05 17:58:05)

Re: help restoring database

That is one query on each line. Either add semicolons to the end of each query or run them individually. In general, when people provide you with queries to run, they won't put semicolons at the end and each query is most easily run individually.

Re: help restoring database

Working ! thanks so much !

Re: help restoring database

With what should I backup my DB in the future ?

Re: help restoring database

Database Management plugin. Or phpMyAdmin.

Re: help restoring database

I've been using PunBB Backup as well.

Can you link to the recommended Database Management plugin for 1.28?

Re: help restoring database

http://punbb.informer.com/download/plug … gement.zip
The same place you downloaded the backup plugin from wink