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.

Corrupted Mysql Dumps for CPanel Backups

Discussion in 'General Discussion' started by silversurfer, Mar 12, 2008.

  1. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    Anyone else facing this issue: http://bugzilla.cpanel.net/show_bug.cgi?id=6412

    It is happening on all the servers we have when I checked. Just curious why no one else have reported it so far.

    We are running Mysql 4.1.x / CentOS 4, and the Current tree.
     
  2. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Hello:

    We noticed this bug 3 days ago on a CentOS 4.x box running the latest Stable build with MySQL 5.x. Hopefully this was before any server crash... We have removed the "-v" option as suggested in the bug report and everything went back to normal. Nevertheless, this bug is critical and may have severe business implications as all daily mysqldumps are corrupted!

    The same script is not causing any problem on a CentOS 5.x box so I am not sure about the exact config that are concerned by this bug.

    Regards,

    S
     
    #2 sebby, Mar 15, 2008
    Last edited: Mar 15, 2008
  3. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Well, be careful as all changes to the /scripts/pkgacct will be overwritten during the daily cPanel update, therefore breaking all future mysqldump backups... Maybe I will disable the automatic cPanel update until this bug is addressed.
     
  4. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    This really needs to get fixed soon.
     
  5. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    What we did was to set the file attributes immutable.

    Indeed, it needs to be fixed asap. I would think with our detailed and clear bug report, it's a matter of a tweak and pushing out the fix. Their lack of urgency is discouraging. We run and manage over 300 cpanel servers and if given the choice, we rather not have to do a hack on their scripts all over if they can push out the fix quickly.
     
  6. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    This is silly it's not already fixed. It's great we can patch out boxes to make this work but if we got people migrating to our services their backups from cPanel are totally useless as it stands.
     
  7. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Well I just got told this via a support ticket

    "Hello,

    There is not much we can do until the developers push out the fix mentioned in the bug report.

    Regards,

    Phil "
     
  8. as_pavlov

    as_pavlov Member

    Joined:
    Dec 10, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    At us too this problem! When will correct?!
     
  9. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Well based on the longer development cycles I've been seeing in cPanel lately I'd see probably looking at a 1-3 week wait before any of us see this fix propagated to the update servers so every cPanel machine actually updates.
     
  10. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Presumably the dumps can be edited so they work?

    What does a corrupted mysql backup look like?
     
  11. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Sorry - I worked out the answer by reading the bug report.

    It looks to me like my database dumps are not corrupted - the "--" at the start makes the messages into comments, and they seem to be coming out in the appropriate places rather than being intermingled. I wonder if this is intermittent or if it's related to a problem somewhere else. I also wonder whether the addition of the '-v' to the mysqldump was recent or happened a long time ago - if it is old, the problem lies elsewhere even though the removal of -v appears to fix the problem.
     
  12. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    So, again, just to be clear - as far as I can see that is NOT happening here, and yet I have the mysqldump -v option.

    So based on that alone I suspect that the actual cause is elsewhere.

    I'm not questioning for a moment that it's happening elsewhere, just wondering about the cause.

    [for some reason VB is displaying this response above what I am replying to, it should actually be after the next response from VeZoz]
     
    #12 brianoz, Mar 21, 2008
    Last edited: Mar 21, 2008
  13. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    -v is throwing stuff to the screen and as the bug report suggests it is random

    So I could have it thrown into it's own line so it's fine. But you can also see it thrown in on part of the create table statement resulting in it becoming syntax error.


    I've seen lots of users providing backups with wordpress installed on them. What I end up seeing is wp_users missing and a few other tables while others are fine. I also saw some .sql files not have any syntax issues. But if you have 5 databases with a reasonable number of tables I'd say you'd average 4 of the 5 having syntax issues.
     
  14. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Well I've got a machine that doesn't have this pkgacct file (it's a dns box).

    That's what its code looks like


    Code:
     foreach $db (@DBS) {
                $db =~ s/\n//g;
                if ( $> == 0 || $ENV{'REMOTE_PASSWORD'} eq "" ) {
                    open( MYSQLDUMP, "-|" )
                      || exec( "$mysqldump", @downgrade_options, "-c", "-Q", "-q", "${db}" );
                }
                else {
                    open( MYSQLDUMP, "-|" )
                      || exec( "$mysqldump", @downgrade_options, "-c", "-Q", "-q", "-u${user}", "-p$ENV{'REMOTE_PASSWORD'}", "${db}" );
                }
                open( SQL, ">", "${tarroot}/${prefix}${user}/mysql/${db}.sql" );
                use bytes;
                while (<MYSQLDUMP>) { print SQL; }
                no bytes;
                close(SQL);
                close(MYSQLDUMP);
            }
    
    Last Modified: Sep 10 2007

    It also claims to be "cpanel12 - pkgacct"

    Considering -v would be verbose I'm not sure why it be there.
     
    #14 VeZoZ, Mar 21, 2008
    Last edited: Mar 21, 2008
  15. hbidad

    hbidad Well-Known Member

    Joined:
    Apr 16, 2005
    Messages:
    74
    Likes Received:
    1
    Trophy Points:
    8
    I saw many that backup fine, restore fine, but only have 59 tables out of 250+. Although, I got the same results using phpMyadmin too. I had to export the missing tables several times using phpmyadmin to get them all to have a complete database.


    I'm also having issues with account fullbackups not packaging the entire account. If I was generate a full backup and download it, it will give CRC errors. Who knows, one and the same issue?
     
  16. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I've been told they don't expect new releases until the 25th so do not expect this to be fixed until at least then unfortunately.
     
  17. djmerlyn

    djmerlyn Well-Known Member

    Joined:
    Aug 31, 2004
    Messages:
    203
    Likes Received:
    1
    Trophy Points:
    16
    We just got hit with this issue as well, 2 restored sites are actually in worse shape then prior to the restore.

    It would be nice if they would push out a patch for it, as it really is a debilitating bug. Backups are supposed to be reliable, it makes no sense to have them right now unless the site being backed up has no database. Backups of sites with databases are essentially a waste of space at the moment.
     
  18. VeZoZ

    VeZoZ Well-Known Member

    Joined:
    Dec 14, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider

    I'm just telling anyone who has this problem to make a ticket with cPanel. Maybe if they start getting dozens of tickets complaining about this bug they might actually consider patching it now not when they make another release.

    As of now I know it affects the following

    - Backups automatically generated
    - Backups generated by cPanel users
    - All account copy features
     
  19. Jorge

    Jorge Well-Known Member

    Joined:
    Feb 19, 2003
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Today is 25 and the issue has not been fixed.
     
  20. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    I believe it has already been fixed:

    ------- Comment #4 From Kenneth Power 2008-03-24 16:23 [reply] -------

    This matter is resolved in all builds. If your cPanel install is set to
    Automatically update, you will receive the fix during the next update.
    Otherwise, execute /scripts/upcp to receive the fix now.

    Build number remains at 21703 as a new build is not being issued for this.


    I checked some servers and it is no longer carrying the -v switch.
     
Loading...

Share This Page