Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,440

Results 41 to 60 of 327
8 Jul 2006, 3:38 AM
#41
drbyte avatar

drbyte

Sensei

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

Backup MySQL Database

tekram:

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

This would appear to be an issue with Windows and needing/not-needing double-quotes around command-line names vs parameters.
I don't see it being an issue with safe-mode or basedir restrictions or exec().
It doesn't appear to be the typical windows problem with not allowing access to CMD.EXE, since you're not running a Server O/S.

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

8 Jul 2006, 3:47 AM
#42
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

brimsjewelry:

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

A sudden change would typically suggest a change on the server side, usually related to permissions.
It could be related to permissions on the /admin/backups folder
It could be corruption to the admin/includes/languages/english/backup_mysql.php file
It could be corruption to the /admin/backup_mysql.php file

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

4 Aug 2006, 8:57 AM
#43
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

I have installed the backup according to instructions but I recieve this error:

**Result code: 1
0 => 'c:/Program' is not recognized as an internal or external command,

1 => operable program or batch file.

Failure: The database has NOT been saved. **

I have changed to correct map in /admin/includes/languages/english/backup_mysql.php but still the same.

I am using XP and running the shop on my computer, it's not live yet. ZC1.3.0.2 and the swedish language pack.

Please, need help...

/Typhoon

4 Aug 2006, 10:37 AM
#44
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

Hi again ! :D

I think I have solved the problem above. If I changed in /admin/backup_mysql.php the following, for the $pathsearch variable (taking out the last part only...)

$pathsearch=array(.............. ''c:/Program Files/MySQL/MySQL Server 5.0/bin/'', ''d:\Program Files\MySQL\MySQL Server 5.0\bin\'');

to

$pathsearch=array(.............. '"c:/Program Files/MySQL/MySQL Server 5.0/bin/"', ''d:\Program Files\MySQL\MySQL Server 5.0\bin\'');

... changing from ' to " after the \ solves the error message above. If I do the same change in /admin/includes/languages/english/backup_mysql.php nothing happens. I don't know why but it's probably one step closer to solution..

Now, I have another message when I'm trying to do a backup...

** Result code: 1
0 => 'mysqldump" "--host' is not recognized as an internal or external command,

1 => operable program or batch file.

Failure: The database has NOT been saved. ** :(

As you can see, it's the same problem as tekram have but I can't see any solution to this problem... Any solutions ?

Regards,
/Typhoon

11 Aug 2006, 1:59 PM
#45
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

I hate this but... bump...

I have searched around in this forum for simular problem but I havn't found any solutions for my problem. Please, anyone have any tips ?

/Typhoon

11 Aug 2006, 9:41 PM
#46
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Is this for offline development or live hosting of your site?

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

11 Aug 2006, 10:20 PM
#47
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

For the moment it's local, on my server. within a month it will be "live"...

/Typhoon

11 Aug 2006, 11:23 PM
#48
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Does it work properly on your "live" server? Or is it too soon to test?

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

12 Aug 2006, 10:02 AM
#49
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

I don't have any possibility to try the shop on a "live" server for the moment. Do you think that's the problem ? Do you think it will work when it's live ?

/T

12 Aug 2006, 10:05 AM
#50
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Typhoon:

I don't have any possibility to try the shop on a "live" server for the moment. Do you think that's the problem ? Do you think it will work when it's live ?

/T
Most likely, especially if it's not hosted on a Windows server (yuck!)

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

12 Aug 2006, 10:08 AM
#51
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

The day I go "live", it will be on a window server, will it be "quote problems" you think ? Or is your addon "windows friendly" ? :D

/T

12 Aug 2006, 10:24 AM
#52
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Ugh.

"friendly" ... as friendly as "windows" is in a hosting environment :P

Since every Windows server is configured differently, and since Windows has complicated security risks, it is a challenge to pre-anticipate every issue.

Try it on your live host and when the time comes, we'll deal with it then.

Keep in mind that if your host isn't willing to open up webserver access to cmd.exe, then this tool will most likely not work for you. Sorry... thank Bill.

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

29 Aug 2006, 6:15 AM
#53
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Backup MySQL Database

DrByte:

Try it on your live host and when the time comes, we'll deal with it then.

Hi there !

You were very right, when I put my shop on my live host, the backup part is working just like it suppose to. Thanx.

/Typhoon

19 Oct 2006, 6:20 AM
#54
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Backup MySQL Database

I am also getting this error:

Result code: 1
0 => 'mysqldump" "--host' is not recognized as an internal or external command,

1 => operable program or batch file.

Failure: The database has NOT been saved.

Is there no way to install ZC on Windows XP for local testing purposes?

I tried WAMP5 and got this error and now I have switched to XAMPP and get the same error. Anyone have a suggestion?

Thank you.

**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *

8 Nov 2006, 7:35 AM
#55
imac avatar

imac

New Zenner

Join Date:
Mar 2006
Location:
Durham, UK
Posts:
78
Plugin Contributions:
0

Re: Backup MySQL Database

duncanad:

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? Yep. Exactly the same problem here. > Woodymon:

Workaround: When I want to back up with compression off I just turn it off in Configuration > GZip Compression. Then I back up. Doesn't work for me :( > duncanad:

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

The "No Compression (Pure SQL)" radio button in the BU mod dialog is defectively sticky ... I was the same way, not compressing the DB at first. But after many imports and exports I am now just fine with compressing. Still can't get it to work for me. Strange thing is that out of 20-odd attempts to backup without compression, 1 or 2 will work but the rest will be .gz. > duncanad:

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. Me too! Intermittent faults are always the worst. It's just kindof unsettling when you know something doesn't work but you don't know why :unsure:

8 Nov 2006, 7:55 AM
#56
gwaitsi avatar

gwaitsi

New Zenner

Join Date:
Oct 2006
Posts:
48
Plugin Contributions:
0

Re: Backup MySQL Database

I have a development site on my local machine. if i try to use the backup command, i get the following error.

Result code: 1
0 => 'c:/Program' is not recognized as an internal or external command,
1 => operable program or batch file.

I should point out that it does work on the live site. Can you please help with a fix for the local environment.

Thanks

8 Nov 2006, 8:09 AM
#57
lloyd_borrett avatar

lloyd_borrett

Zen Follower

Join Date:
Mar 2006
Location:
Rosebud, Victoria, Australia
Posts:
308
Plugin Contributions:
2

Re: Backup MySQL Database

G'day,

If you're thinking of using something like this to backup your MySQL databases, then you might want to check out the excellent mySQLdumper at www.mysqldumper.de/en/.

mySQLdumper enables me to get regular backups of all of my MySQL databases sent via email or FTP file transfer.

mySQLdumper works so as to overcome the limitations people often come up against when trying to backup and/or restore larger databases.

It's pretty much a set and forget solution. Though I must admit it took me a while to set it up the first few times. I wrote myself a detailed step by step guide which you should be able to find either on the mySQLdumper forums, or on the forums at JaguarPC.

Best Regards, Lloyd Borrett.

Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

11 Nov 2006, 5:03 PM
#58
alanmac avatar

alanmac

New Zenner

Join Date:
Jun 2004
Posts:
34
Plugin Contributions:
0

Re: Backup MySQL Database

I am trying to upgrade my cart to 1.3.6, but I've decided to start from a vanilla version of the current codebase. I just tried to install the latest version of the excellent database backup utility on my windows xp sp2 test box and I get a similar problem as other windows users :-

Warning 0 => 'c:/mysql/bin/mysqldump.exe" "--host' is not recognized as an internal or external command,
Warning 1 => operable program or batch file

However, I have an older version of this in contribution working on my 1.2.6 cart running, on the same windows test box. Any idea's ?.

14 Nov 2006, 5:28 AM
#59
gwaitsi avatar

gwaitsi

New Zenner

Join Date:
Oct 2006
Posts:
48
Plugin Contributions:
0

Re: Backup MySQL Database

It is pretty sad! I am a total beginner with no PHP, HTML, CSS, etc.
I am learning as i go, but there doesn't seem to be a great deal of support from those with the knowledge.....

The problem with this mode is: -

mqsqldump: - (backup)

Line 115, 116, 177, 129:

Original
$dump_params .= '" --host=' . DB_SERVER . '"';

New
$dump_params .= ' --host=' . DB_SERVER . '';

The original only works on linux/unix (i guess) the quotes don't work on windows.

Removes the quotes and the backup will function on both environments.

Mysql; - (restore)
Linux/Unix
$load_params .= ' "--host=' . DB_SERVER . '"';

Windows
$load_params .= ' --host=' . DB_SERVER . '';

Now i need your help! How do i make a switch to use quotes on linux/unix or no quotes on windows please.

21 Nov 2006, 7:29 AM
#60
gwaitsi avatar

gwaitsi

New Zenner

Join Date:
Oct 2006
Posts:
48
Plugin Contributions:
0

Re: Backup MySQL Database

I have successfully modified this mode to work on both linux and windows.

The only issue i have with it now is to get it to use gzip for windows.
I didn't seem to have much luck with that after many unsuccessful attempts.