Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Backup database errors

Discussion in 'Database Discussions' started by solcomputers, Feb 11, 2018.

  1. solcomputers

    solcomputers Registered

    Joined:
    Feb 11, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I keep getting these errors on my server.

    "The backup process completed, but 6 errors occurred."

    This might have been because of unplanned downtime last year when the motherboard was replaced.

    In /var/lib/mysql/ I appear to be missing the relevant .ibd files but have .frm files.

    How can I restore the database tables going ahead?

    Code:
    The backup process encountered the following errors:
    
    [2018-02-11 02:05:22 +0100] granalac_svcs: mysqldump: Got error: 1146: Table 'granalac_svcs.gas_wfNet404s' doesn't exist when using LOCK TABLES
    
    warn [pkgacct] granalac_svcs: mysqldump: Got error: 1146: Table 'granalac_svcs.gas_wfNet404s' doesn't exist when using LOCK TABLES
    
    [2018-02-11 02:44:48 +0100] solcomps_wp1: mysqldump: Got error: 1146: Table 'solcomps_wp1.scb_wfHoover' doesn't exist when using LOCK TABLES
    
    warn [pkgacct] solcomps_wp1: mysqldump: Got error: 1146: Table 'solcomps_wp1.scb_wfHoover' doesn't exist when using LOCK TABLES
    
    [2018-02-11 03:12:09 +0100] cbfmradi_cp: mysqldump: Got error: 1146: Table 'cbfmradi_cp.cp_wfBadLeechers' doesn't exist when using LOCK TABLES
    
    warn [pkgacct] cbfmradi_cp: mysqldump: Got error: 1146: Table 'cbfmradi_cp.cp_wfBadLeechers' doesn't exist when using LOCK TABLES
    
    
    
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,728
    Likes Received:
    78
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    There are few possible reason of this error:

    1. Permission and ownership on tables files in /var/lib/mysql is not correct, ideal ownership should be to mysql user and permission 660.
    2. table not exist, can be checked using below commands.
    3. table created in uppercase, set lower_case_table_names as per your application requirement.
    4. table is corrupt, repair the table.

    For example:
    root : ~> # mysql
    mysql> use cbfmradi_cp
    mysql> show tables;


    Check if table cp_wfBadLeechers exists.

    Also, use --skip-lock-tables parameter with mysqldump to skip lock tables, check if that dumps the database properly..
     
  3. solcomputers

    solcomputers Registered

    Joined:
    Feb 11, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hi,

    1. mysql is the owner of /var/lib/mysql, permission is 0751.
    2. The tables appear to exist when running show tables against the affected databases.
    3. Think this is ok.
    4. I've already tried repairing the database tables with phpmyadmin without success.

    These databases were all converted to InnoDB a while ago and I have the .frm files for them, but not the .ibd files. Can I recreate the tables from the .frm files?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,763
    Likes Received:
    1,710
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could try repairing InnoDB using the guide at:

    InnoDB Corruption Repair Guide

    However, if data was lost, it's possible you may need to recreate those tables with help from the developers of the scripts they are associated with. We provide a list of companies offering system admin services if you need help doing that:

    System Administration Services | cPanel Forums

    Thank you.
     
Loading...

Share This Page