alexwalker

Registered
Oct 22, 2006
2
0
151
I have been testing the backup and restore on my alexwalker site. I need to be confident
that I can backup and restore a site when it goes down for whatever reason. I have
managed to restore the files from a backup - no problem. However, when I try and do a
restore from the sql file - no joy. It looks like it is doing it but doesn't actually
restore anything. I then try and do a manual sql insert and it comes up with errors like
the following:

--
-- Dumping data for table `jos_components`
--
INSERT INTO jos_components( id, name, link, menuid, parent, admin_menu_link,
admin_menu_alt,
OPTION , ordering, admin_menu_img, iscore, params )
VALUES ( 1, 'Banners', '', 0, 0, '', 'Banner Management', 'com_banners', 0,
'js/ThemeOffice/component.png', 0, '' ) ;

MySQL said: Documentation
#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 'option, ordering, admin_menu_img,
iscore, params) VALUES (1,'Ba

How can I get errors, if I have just made a backup of the sql database that was on the
server? I don't understand. Please can you advise? As soon as I delete the offending line
it then comes up with another error message later on.

Regards
Alex
 

alexwalker

Registered
Oct 22, 2006
2
0
151
SQL error on restore

Infopro
The Database was gzipped and was 557 Kb. I tried to do a restore via cPanel and that failed to restore anything. I then did a manual restore using a sql text file (1,006 Kb) and doing it in small 'chunks'. I know it can only cope with so much data at once. I cannot understand why I am getting sql error messages when I am using the same data from the MySql database. What comes out must go back in, right? Any help and advice is appreciated. Regards. Alex

PS My web host has come back with this suggestion, which I don't understand, so I have gone back and asked where I put this statement.

Hi Alex

Have you tried issuing the --compatible=mysql40 flag? Where was
ie. mysqldump --compatible=mysql40 -uusername -ppassword database > database.sql

Please update the database somewhere and mention the destination dbname, we'll further
look into this.

Regards

Simon Comfort
HostHere Support
 
Last edited: