Cannot download database backup

mikelato

Verified User
Joined
Jan 25, 2010
Messages
74
I am trying to download a backup of a MySQL database on the user level.

When I go to "Home>MySQL Management" it shows all of the users databases. In the list there is an option to download the database backup.

When I click on the download link I get an error saying...

Unable to download databaseuser_database from domain.com.

Unable to open this internet site...

What would be the cause of this?

Thanks,
Mike
 
Hello,

Is that a DA generated error shown on a DA page, or an error shown by your browser due to nothing being sent to your browser? I checked the code and that text does not appear anywhere in it.

In any case, check /var/log/directadmin/error.log

Also try DA in debug mode:
http://help.directadmin.com/item.php?id=293

My guess is that mysqldump isn't getting the sql file dumped into /home/tmp.. Ensure that /home/tmp is chmod to 1777.

John
 
It is a browser error like the file doesn't exist. I just changed the permissions on the /tmp folder to 1777 but it is still giving me the error?

Any more suggestions?

-Mike
 
Also, there is no error being generated by clicking the log file in /var/log/directadmin/error.log...
 
And the last piece of information...

Output from debug mode:
Sockets::handshake - begin
Sockets::handshake - end
/CMD_DB/admin_database.gz
0: Accept-Encoding: gzip, deflate
1: Accept-Language: en-US
2: Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
3: Connection: Keep-Alive
4: Cookie: SESSae398fe598ee3c10985bbd6ebc9e8793=IankYmQU9i_P-fUufKpxDSCHmgsQfC7VfcEJV6gyDN4E2WNGJqvvrtkW9EmgcnrE; a71454fa6c7f211efbe688f90b3abe12=HSof7IMUJYzVoDLIbE4YCvTpQkTPJK3TlvBx8F7mapU_eEn4ViQzHRbXO1kiPdK4; session=UVee6g8lWeODExXmM81Bz69R1qHTBlWgE8IKpQ5J3SUFP11j72s681X8snb1W5fk
5: Host: www.domain.com:2222
6: Referer: https://www.domain.com:2222/CMD_DB?domain=domain.com
7: User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Checking referer https://www.domain.com:2222/CMD_DB?domain=domain.com to www.domain.com:2222
Referer check passed: www.domain.com=www.domain.com 2222=2222
Command::doCommand(/CMD_DB/admin_VXiVXdrupa.gz)
download gz sql backup: /usr/bin/mysqldump --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --host=localhost --add-drop-table --create-options --extended-insert --quick --quote-names --no-create-db admin_database | /usr/bin/gzip > /home/tmp/admin_database.gz
Command::doCommand(/CMD_DB/admin_database.gz) : finished
Command::run: finished /CMD_DB/admin_database.gz

Thanks again,
Mike
 
I haven't but that wouldn't really be a good solution as almost all of my clients use IE.

Does anyone have any other ideas as to why this would be happening?

Thanks,
Mike
 
It's a good idea to test if it's a browser issue, but my guess is that it's someting else.

debug said:
> /home/tmp/admin_database.gz
Command::doCommand(/CMD_DB/admin_database.gz) : finished
Command::run: finished /CMD_DB/admin_database.gz
I don't know exactly what the last 2 commands do. But what I'm reading from the debug is that the backup is written to /home/tmp, which is not accessable by the browser normally. Or -is- it accessible because the backup is made through directadmin itself?
Shouldn't there be a copy command somewhere which copy's the backed-up database to /home/admin/admin_backups (or whatever user you are making the backup for)?
Or is one of the two last commands doing that? Like I said, I'm not sure about the exact backup procedure.
 
Last edited:
Back
Top