upsforum

Well-Known Member
Jul 27, 2005
474
0
166
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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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
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.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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 @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
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
 

upsforum

Well-Known Member
Jul 27, 2005
474
0
166
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 @[email protected]@CHARACTER_SET_CLIENT */;
/*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */;
/*!40101 SET @[email protected]@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @[email protected]@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @[email protected]@SQL_NOTES, SQL_NOTES=0 */;
 

mediaguru

Registered
Nov 8, 2008
1
0
51
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.
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.
 

LifeSteala

Member
Dec 16, 2007
23
0
51
I fully agree!

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.
 

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
The reseller does not have access to the user's MySQL password.
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.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
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.
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
 

EWD

Well-Known Member
PartnerNOC
Aug 19, 2003
165
0
166
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.
 

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
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

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.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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.
 

ChrisRHS

Well-Known Member
Jul 12, 2006
292
5
168
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.
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.
 

ChrisRHS

Well-Known Member
Jul 12, 2006
292
5
168
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.
 
Last edited:

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
no such file...

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.
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.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
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.
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.
 

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
Huh? That makes no sense.

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.
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
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
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
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.
 

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
Ok, that makes a little more sense...

Accessing the MySQL interface in cPanel will reset the account's MySQL password to be the same as the cPanel password.
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
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
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
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.