The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Doing a SQL restore fails !

Discussion in 'Data Protection' started by alexwalker, Oct 22, 2006.

  1. alexwalker

    alexwalker Registered

    Joined:
    Oct 22, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    How large is the database? How did you do the manual insert you tested? The full DB or one piece of the DB?
     
  3. alexwalker

    alexwalker Registered

    Joined:
    Oct 22, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #3 alexwalker, Oct 22, 2006
    Last edited: Oct 22, 2006
Loading...

Share This Page