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.

Failed to perform full MySQL database backup

Discussion in 'Data Protection' started by capflam, Jan 12, 2013.

  1. capflam

    capflam Registered

    Joined:
    Jan 12, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    My backup logs say that "Failed to perform full MySQL database backup" and I am not sure how to solve this issue.
    There is a forum on my server, which databse is pretty large, about 2Gb and obviously I want to secure backups that are not going to be a problem is I need to restore.

    The error is like this:
    [cpbackup] Starting full MySQL database backups
    /bin/gtar: Removing leading `/' from member names
    /bin/gtar: /var/lib/mysql/mysql.sock: socket ignored
    /bin/gtar: /var/lib/mysql/my_database_name/thread.MYD: file changed as we read it
    [cpbackup] Failed to perform full MySQL database backup

    Can someone explain or help in any way? I've been searching for an answer but found nothing...

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,736
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you check to see if the database mentioned with "file changed as we read it" in the backup log is corrupted? You can use a command such as:

    Code:
    # mysqlcheck database_name
    Thank you.
     
  3. capflam

    capflam Registered

    Joined:
    Jan 12, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Michael,

    My admins had already performed a mysqlcheck and there doesn't seem to any corruption.
    The backup doesn't seem to fail every time, only "most of the time". For instance on Monday there was no mention of the failed MySQL backup in the logs.

    Any idea what would cause this and how to fix it? Please let me know.

    Thanks
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,736
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This error occurs when the database is updating and changing the file on disk at the same time as gtar (the compression program) is reading the same file.

    This behavior is an unavoidable side effect of creating a compressed backup of the entire MySQL directory. It's always preferred to create backups via mysqldump, and mysqldumps are stored in each user's backup files. You may want to modify your backup configuration so that "Backup SQL Databases" is set to "Per Account Only".

    Thank you.
     
Loading...

Share This Page