Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,440

Results 21 to 40 of 327
7 Jun 2006, 5:13 AM
#21
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Backup MySQL Database

It's likely that the path to the mysqldump binary may be causing it, and instead the path should perhaps be left out.

mysqldump

instead of

/usr/bin/mysqldump

Either that, or the way the command is being sent isn't properly separating the command from its parameters...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2006, 11:39 AM
#22
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Backup MySQL Database

DrByte:

It's likely that the path to the mysqldump binary may be causing it, and instead the path should perhaps be left out.

mysqldump

instead of

/usr/bin/mysqldump

Either that, or the way the command is being sent isn't properly separating the command from its parameters...

Hmmm.. that doesn't do it either. I have switched to a zencart certified host from dreamhost, and have the same problem on the new host.

--
Author of Stock vs. Sales Report

8 Jun 2006, 6:57 AM
#23
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

Just a note that may apply. Previously after installing the BU plugin on v1.26, and later on 1.30, when I first ran the tool I received the same errors reported below (unable to find binary and backup failed). However the backup still worked (successfully backed up my database, both to the server and downloaded to my client). I successfully tested restoring my db's with the backups.

Later I had my domain account moved to an upgraded server and then I did a fresh install of 1.3.0.1. The plugin installed on 1.3.0.1 without those errors. And works fine.

Apologies if you've already responded to the questions below, but in case not...

What are permissions on your /admin/backups folder?

Do you see the same errors when backing up to the server versus downloading backup (choosing "Download without storing on server")? I don't normally backup to my client using this tool but useful for testing.

Do you see these same errors if GZIP is enabled or not (in Zen Cart admin - Configuration > GZIP)? (shouldn't apply but you never know).

Woody

8 Jun 2006, 8:04 AM
#24
duncanad avatar

duncanad

Zen Follower

Join Date:
Nov 2004
Location:
Glasgow, Scotland
Posts:
247
Plugin Contributions:
0

Re: Backup MySQL Database

Just downloaded and installed v 1.2.0.10a onto Zencart v 1.3.0.1

I had no problems installing - I've used previous versions on versions 1.2x of Zencart with no problems whatsoever.

One small bug I have found with the new version is that if I backup to the server and click the 'No compression' radio button I get a .gzip file rather than an uncompressed file. If, however, I tick the 'Download without storing on the server' box I get an uncompressed file as expected.

Anyone else experienced this problem?

Great tool b.t.w. I never install Zencart without it.

Regards,

Alan

workingIT.co.uk
working IT for business

8 Jun 2006, 12:23 PM
#25
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Backup MySQL Database

Yep same for me too!

I've gone back to an earlier version (around sept 05) and it works as it should.

While a lot of other stuff was probably fixed, this small quirk was introduced.

8 Jun 2006, 12:43 PM
#26
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Backup MySQL Database

Woodymon:

Just a note that may apply. Previously after installing the BU plugin on v1.26, and later on 1.30, when I first ran the tool I received the same errors reported below (unable to find binary and backup failed). However the backup still worked (successfully backed up my database, both to the server and downloaded to my client). I successfully tested restoring my db's with the backups.

Later I had my domain account moved to an upgraded server and then I did a fresh install of 1.3.0.1. The plugin installed on 1.3.0.1 without those errors. And works fine.

Apologies if you've already responded to the questions below, but in case not...

What are permissions on your /admin/backups folder?

Do you see the same errors when backing up to the server versus downloading backup (choosing "Download without storing on server")? I don't normally backup to my client using this tool but useful for testing.

Do you see these same errors if GZIP is enabled or not (in Zen Cart admin - Configuration > GZIP)? (shouldn't apply but you never know).

Woody

Permissions are 777 on admin/backups, and I get the same error no matter which combination of settings I use. This is hosted on camelot-hosting, so there shouldn't be anything weird with their setup.

--
Author of Stock vs. Sales Report

8 Jun 2006, 12:49 PM
#27
ts232 avatar

ts232

Zen Follower

Join Date:
May 2006
Posts:
167
Plugin Contributions:
0

Re: Backup MySQL Database

I tried downloading a fresh version of the mod and reinstalling and everything works! Not sure if there was some weirdness when I originally installed it on my old host, or if I messed it up somehow. Thanks for all the suggestions.

--
Author of Stock vs. Sales Report

8 Jun 2006, 12:52 PM
#28
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

duncanad:

Just downloaded and installed v 1.2.0.10a onto Zencart v 1.3.0.1

One small bug I have found with the new version is that if I backup to the server and click the 'No compression' radio button I get a .gzip file rather than an uncompressed file. If, however, I tick the 'Download without storing on the server' box I get an uncompressed file as expected.

Anyone else experienced this problem?
Yes. I am running Zen Cart 1.3.0.1 with backup_mysql_admin_plugin-1.2.1.0 (not A).

I cannot disable the compression radio button, no matter if backing up to server or if download to remote client..

Workaround: When I want to back up with compression off I just turn it off in Configuration > GZip Compression. Then I back up.

But I have found no reason to disable GZip. Instead of a 20.5MB DB I get a 2MB DB. ;)

Woody

8 Jun 2006, 3:39 PM
#29
gazluvsstace avatar

gazluvsstace

New Zenner

Join Date:
Nov 2005
Posts:
21
Plugin Contributions:
0

Re: Backup MySQL Database

i just installed this contrib... i went to tools and database backup but all it has there is a warning about not using SSL and a restore button... am i missing something??

8 Jun 2006, 5:46 PM
#30
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

GazLuvsStace:

i just installed this contrib... i went to tools and database backup but all it has there is a warning about not using SSL and a restore button... am i missing something??
Reading some of the posts below and the caveats in the readme, did you observe any security restrictions in effect which may be contributing to your issues?

Woody

9 Jun 2006, 4:14 AM
#31
gazluvsstace avatar

gazluvsstace

New Zenner

Join Date:
Nov 2005
Posts:
21
Plugin Contributions:
0

Re: Backup MySQL Database

Woodymon:

Reading some of the posts below and the caveats in the readme, did you observe any security restrictions in effect which may be contributing to your issues?

Woody
yep... there was only 1 i was unsure of which is

"open_basedir /home/httpd/vhosts/domainname/httpdocs:/tmp"

having no idea what that is... or no knowledge of server side stuff??

9 Jun 2006, 7:58 AM
#32
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

GazLuvsStace:

i just installed this contrib... i went to tools and database backup but all it has there is a warning about not using SSL and a restore button... am i missing something??

"open_basedir /home/httpd/vhosts/domainname/httpdocs:/tmp"
having no idea what that is... or no knowledge of server side stuff??

You don't see the Restore and Backup buttons? The security settings should not have impact on rendering of the admin page.

Can you provide a screenshot?

Which version of the Backup mod is installed?
Latest is 1.2.10a (last updated by DrByte on 01-10-06)

Recommend re-uploading the four files:
/admin/backup_mysql.php
/admin/includes/boxes/extra_boxes/backup_mysql_tools_dhtml.php
/admin/includes/extra_datafiles/backup_mysql.php
/admin/includes/languages/english/backup_mysql.php

Woody

9 Jun 2006, 10:02 AM
#33
gazluvsstace avatar

gazluvsstace

New Zenner

Join Date:
Nov 2005
Posts:
21
Plugin Contributions:
0

Re: Backup MySQL Database

Woodymon:

You don't see the Restore and Backup buttons? The security settings should not have impact on rendering of the admin page.

Can you provide a screenshot?

Which version of the Backup mod is installed?
Latest is 1.2.10a (last updated by DrByte on 01-10-06)

Woody
Im using that version... hmm this contrib is for the latest release of zencart isnt it??? pretty sure i read that it was :S.
anyways here is a SS

REMOVED PER REQUEST

16 Jun 2006, 4:38 PM
#34
duncanad avatar

duncanad

Zen Follower

Join Date:
Nov 2004
Location:
Glasgow, Scotland
Posts:
247
Plugin Contributions:
0

Re: Backup MySQL Database

Sorry to take so long to respond to replies to my post. Although I'm subscribed to this thread I don't seem to be receiving email notifications of new posts.

Anyway thanks for the responses.

Woodymon:

Workaround: When I want to back up with compression off I just turn it off in Configuration > GZip Compression. Then I back up.

When I checked my configuration GZip compression was set to 'Off' so this setting does not appear to affect how the backup operates.

Woodymon:

But I have found no reason to disable GZip. Instead of a 20.5MB DB I get a 2MB DB. ;)
Woody

I quite agree. However it depends on how critical your data is - and how paranoid you are! By compresing the data there is a slight increase in the risk of corrupting the data. Larger backup files might be preferable to lost data. Anyway the engineer in me thinks if you are given the option then you should have that option.

Not a big issue - and still an indespensible contribution.

Thanks,

Alan

workingIT.co.uk
working IT for business

16 Jun 2006, 6:03 PM
#35
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

I'm running backup_mysql_plugin_1.2.10 dated Jan 10, 2006, on Zen Cart v1.3.0.1

The "No Compression (Pure SQL)" radio button in the BU mod dialog is defectively sticky, after the first time I selected I have never been able to unselect. I've deemed it a bug and just worked around it by disabling and enabling Gzip from the admin config menu.

I was the same way, not compressing the DB at first. But after many imports and exports I am now just fine with compressing.

Woody

3 Jul 2006, 12:36 AM
#36
theodin avatar

theodin

New Zenner

Join Date:
Sep 2005
Posts:
26
Plugin Contributions:
0

Re: Backup MySQL Database

DrByte,
I have a renamed admin folder - When I installed it would seem the MySQL plugin couldnt find my backups dir anymore. (It exists, just under my new admin location.) I searched the file, and couldnt find any hard references. I also looked in config.php in admin/includes.

My problem was not only should
define('DIR_WS_ADMIN', '/store/xxx/');
define('DIR_WS_HTTPS_ADMIN', '/store/xxx/');

be changed, but ALSO:
define('DIR_FS_ADMIN', '/var/users/xyz/abc/htdocs/store/xxx/');

I dont know if this info might be useful to stick in the docs you have for it...

Fantastic work, thanks for the plugin!!!

3 Jul 2006, 12:38 AM
#37
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Backup MySQL Database

Thanks very much for posting the solution to your backups issue with a renamed /admin ... this will help others who also are following the suggestion to rename the /admin for security purposes ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

3 Jul 2006, 7:35 PM
#38
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Backup MySQL Database

theodin:

I also looked in config.php in admin/includes.

My problem was not only should
define('DIR_WS_ADMIN', '/store/xxx/');
define('DIR_WS_HTTPS_ADMIN', '/store/xxx/');

be changed, but ALSO:
define('DIR_FS_ADMIN', '/var/users/xyz/abc/htdocs/store/xxx/');

The instructions regards to above, plus many more important instructions, are located in /docs/important_site_security_recommendations.html

6 Jul 2006, 10:42 AM
#39
tekram avatar

tekram

Zen Follower

Join Date:
Feb 2006
Posts:
111
Plugin Contributions:
0

Re: Backup MySQL Database

i get the following message when trying to backup:

0 => 'c:/apache2triad/mysql/bin/mysqldump.exe" "--host' is not recognized as an internal or external command,

does this mean the server is running "in strict safe_mode,
or with open.basedir restrictions in effect, or with restrictions against
using "exec()" commands. "

7 Jul 2006, 5:24 AM
#40
brimsjewelry avatar

brimsjewelry

Zen Follower

Join Date:
May 2006
Posts:
188
Plugin Contributions:
0

Re: Backup MySQL Database

I have been using this mod successfully for about two months. But today I went to admin to make a backup and when i click admin/tools/backup mysql I get a blank page. I've tried this in both IE and Firefox with the same result. Any ideas whats going on and how to fix?

Jason