1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql backup from cpanel

Discussion in 'Database Discussions' started by upsforum, May 26, 2008.

  1. upsforum

    upsforum Member

    Joined:
    Jul 27, 2005
    Messages:
    396
    Likes Received:
    0
    Trophy Points:
    16
    from my cpanel if click on "Download a MySQL Database Backup", in Backup area, the file tar result is empty, I restart cpanel all service but don't work
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    You must login as the user (not as a reseller or root) to use this functionality. Logging in as reseller/root will produce the behavior you mention.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    If you are logging in with both the user's username and that user's password (not the reseller's password), that should not happen. I recommend having one of our technical analysts take a look at this for you: http://tickets.cpanel.net/submit
     
  4. upsforum

    upsforum Member

    Joined:
    Jul 27, 2005
    Messages:
    396
    Likes Received:
    0
    Trophy Points:
    16
    I try with user but I get this empty file


    -- MySQL dump 10.9
    --
    -- Host: localhost Database: dbname
    -- ------------------------------------------------------
    -- Server version 4.1.22-standard

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
     
  5. mediaguru

    mediaguru New Member

    Joined:
    Nov 8, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    May I ask why this is the case? As a reselller with a virtual server with dozens of accounts, it will take about 58987% longer to login and out as each individual user to backup their dbs.

    It would be great to be able to be logged in as the reseller and backup all my client's dbs under one session.
     
  6. LifeSteala

    LifeSteala New Member

    Joined:
    Dec 16, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I fully agree!

     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,318
    Likes Received:
    7
    Trophy Points:
    38
    The reseller does not have access to the user's MySQL password.
     
  8. gkgcpanel

    gkgcpanel Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    This is apparently a bug in the Backup Wizard vs Backup. If you use the Backup Wizard, the SQL dumps are empty. If you use Backup, they are fine...

    I've tested this with about 3 different sites on 3 different cPanel servers.

    Just an FYI to those here and to the cPanel team that this needs to be corrected.
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,318
    Likes Received:
    7
    Trophy Points:
    38
    Are you performing your tests logged in directly as the user, or logged in as the reseller?

    As the user, I'm not able to replicate what you are reporting with either 11.24.5-CURRENT_38506 or 11.25.0-BETA_39475

    Using either the Backup or the Backup Wizard interface to download a MySQL backup results in complete dump of the database selected.

    When attempting the same as the reseller, using either of the above versions of cPanel, I receive an error message stating I need to create /home/user/.my.cnf
     
  10. EWD

    EWD Member

    Joined:
    Aug 19, 2003
    Messages:
    166
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    NY
    cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
    CENTOS 5.3 x86_64

    I am seeing this logged in as a user.
    Login to cpanel
    Click on backups
    Click on Database name to download file.
    File downloads but it is empty.
     
  11. gkgcpanel

    gkgcpanel Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16

    The user themselves reported this and they are logged in as themselves. I logged in as the user and I can duplicate this every time.

    I also logged in from my WHM (list users, find the user in question, click on the cPanel logo to get to their cPanel) and the same issue occurs. With BackupWizard the dump file is empty with 20K (within the tar.gz file) and with Backup, it's fine, 12.1 MB (within the tar.gz file).

    My support team also does not have access to whm, they have to obtain the users cPanel username/password and they log in as the user and they can also duplicate the same situation.
     
  12. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    I recommend you notify whoever has root access to the server about this issue so they can contact our technical analysts and have them take a look at this for you.
     
  13. ChrisRHS

    ChrisRHS Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Hi there,

    I am experiencing this issue as well, a backup created through the backup wizard is corrupt, however, a backup through the normal Backup option creates the proper backup.
     
  14. ChrisRHS

    ChrisRHS Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Ok, an update. The user had changed their main account password, however, the .my.cnf file located within the users directory, had not updated the password. To correct the issue, I moved the existing .my.cnf file, to .my.cnf.backup, thus forcing cPanel to recreated this file with the correct password.

    From shell:

    mv /home/user/.my.cnf /home/user/my.cnf.backup

    Then, have the user log into cPanel again, or, if you know the users password, you can log in with it. Once completed, you should be able to download sql backups.
     
    #14 ChrisRHS, Oct 4, 2009
    Last edited: Oct 4, 2009
  15. gkgcpanel

    gkgcpanel Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    no such file...

    I logged in and there is no such file .my.cnf in any of my users home directories.. I have the main one under root, but those that I checked, don't have a file named like that.
     
  16. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,318
    Likes Received:
    7
    Trophy Points:
    38
    Would you confirm the following, please:

    Is the user's cPanel password the same as his MySQL password?


    If the two are not the same, the MySQL backup will not work.
     
  17. gkgcpanel

    gkgcpanel Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    Huh? That makes no sense.

    Many customers don't always use the same password for their MySQL DB as they did for their cPanel password. In fact, we generate the cPanel password for them and send it to them. It's not even recommended to use the same password for other sections of the server. Your cPanel/FTP password should be different from MySQL, and Email and whatever else...

    If the backup option for MySQL backups really does rely on same password as the cPanel/FTP, then it shouldn't be allowed to be changed or set when someone creates a MySQL DB through the MySQL Database Wizard.

    Or it should have a message "Should be the same as your cPanel in order for backups to function properly" or something like that.

    I can assure you that their Database password is not the same as their cPanel. So, I will discuss that with them and ask them if it's ok to change the password to match and see if that solves the problem with backup.

    Thanks,
    Peter
     
  18. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,318
    Likes Received:
    7
    Trophy Points:
    38
    There is no way in the cPanel interface to change the MySQL password for the cPanel account, making it separate and distinct from the cPanel password. The only way to accomplish such is outside the product.

    Accessing the MySQL interface in cPanel will reset the account's MySQL password to be the same as the cPanel password.

    The users created in the MySQL cPanel interface are not used for backup purposes, nor for any administrative function.
     
  19. gkgcpanel

    gkgcpanel Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    Ok, that makes a little more sense...

    So, using what you quoted, if the user logs onto cPanel and then goes to the MySQL interface, the password should then be reset. Then the backup functions should work normally. Well, both the user and myself have tried that. Still the backups don't work.

    Just an FYI

    Thanks,
    Peter
     
  20. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,318
    Likes Received:
    7
    Trophy Points:
    38
    Please check the user's home directory for a .my.cnf file. If one exists, please ensure the password specified inside matches the user's password.
     

Share This Page