Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,443

Results 261 to 280 of 327
25 Jul 2023, 7:34 PM
#261
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Backup MySQL Database

Seeing logs under PHP8.1:

--> PHP Warning: Undefined array key 1 in /home/bmicpanel/public_html/client/admin/backup_mysql.php on line 157.

where that line is

    if (zen_not_null($resultcodes)) list($strA, $strB) = preg_split ('/[|]/', $resultcodes);

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 Jul 2023, 8:40 PM
#262
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

In my version I find I modified it for that same reason,
from
list($strA, $strB) = preg_split ('/[|]/', $resultcodes);
to
[$strA, $strB] = array_pad(explode('|', $resultcodes, 2), 2, null);

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

25 Jul 2023, 9:09 PM
#263
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 Jul 2023, 9:21 PM
#264
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

Hmm, no, there's so many changes in my personal version, it's difficult to push things piecemeal logically...haven't got round to it!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

25 Jul 2023, 11:28 PM
#265
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

Yep, that looks like what's needed. TY.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jul 2024, 3:54 PM
#266
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Backup MySQL Database

I just tried the backup mysql on my new 2.0.1 upgrade and it just gives a blink to the admin page and returns to the admin page. Has anyone successfully install it?

12 Jul 2024, 3:56 PM
#267
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,733
Plugin Contributions:
56

Re: Backup MySQL Database

Please post the debug log file from the /logs folder. It has been tested and should work.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

13 Jul 2024, 3:40 PM
#268
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Backup MySQL Database

swguy:

Please post the debug log file from the /logs folder. It has been tested and should work.

Thanks for your reply. The same symptom existed in another plugin. So I recovered from a backup before the backup plugin was added and installed the backup plugin again and it worked. I must has done something wrong. It works now.

14 Aug 2024, 11:20 AM
#269
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

I've long been making changes to this plugin and have finally incorporated them in GitHub, branch dev:

https://github.com/torvista/Zen_Cart-Backup_MYSQL_Plugin/tree/dev

including:

  • converted to an encapsulated plugin
  • auto-finds the mysql executables (stores result in db so does not run auto-find every time).
  • allow a suffix to be added to the backup filename
  • allow gzip and zip compression for backup and restore

So would appreciate some testing and feedback in the issues.

Caveat Emptor, as always.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

10 Dec 2024, 1:03 AM
#270
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
429
Plugin Contributions:
0

Re: Backup MySQL Database

I only recently stumbled onto this plugin by accident.
Very nice work!

Tested on zc 2.1.0 with PHP 8.4.1 MariaDB MySQL 11.6.2
with export and restore

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

16 Jan 2025, 8:35 PM
#271
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

I have installed the version 1-5g into my fresh copy of Zen Cart v.2.1 on my local computer for upgrading and received the error message that swguy had in post #261. I applied torvista's change in post #262, but got the error that it didn't like the square bracket...and expected the round bracket so I made this change.

I now have no errors in the error log, but I still have the error (had this error before making the code change as well) at the top of my Admin page when running a backup:

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

Can you shed some light on how to fix this?? I am using WAMPP in my local computer.

Thanks,

Jeff

16 Jan 2025, 11:18 PM
#272
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

Hi Torvista,

Thanks for making this a Plugin install. As you see in my previous post above...I was having issues with the other version 1-5g of this plug in and came across some other info that mentioned that my problem is likely related to using WAMPP on a Windows machine where is does not like some of the commands.

Being ready to move my working upgraded Zen Cart v.2.1 to a sub folder on my server, I did this and then downloaded and installed your newest plugin for Backup MySQL from Github.

It was a simple install and it works super well! I have tried both backing up and restoring a database ( I now have my current site database in) and all works great! Thank you! The only glitch I experienced was the plugin duplicated. When I go to Admin->Tools-> I have 2 Backup MySQL right underneath each other. It does not matter which one I choose, they both have the same information in them.....there's just 2 of them.

Thought I'd post to let you know as you had mentioned you were looking for info with anyone trying it out.

Thanks again for a great and easy to use plugin

17 Jan 2025, 9:48 AM
#273
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

Thanks for the comments, both of you!

When I go to Admin->Tools-> I have 2 Backup MySQL right underneath each other.

I don't get that, even with install/uninstall....possibly it is debris from the previous failed install?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Jan 2025, 10:06 AM
#274
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

If a couple more users comment/try the Github version, I'll put it in the plugins.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Jan 2025, 12:33 PM
#275
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

Thanks for mentioning that about the possible debris...I will look at that.

Thanks again for the work on this...

17 Jan 2025, 1:50 PM
#276
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

This morning I made sure all debris from past Backup MySQL were deleted from my files (have my current site database in my working copy), I deleted the the new plugin I downloaded from Github and then placed it back into the zc_plugins folder and installed it.

Now I only have 1 Backup MySQL showing....nothing in the error logs, but when I go to it in Admin->Tools I get this at the top of my page:

PHP-Disabled Functions: ini_alter,system,passthru,shell_exec,leak,listen,chgrp,apache_setenv,define_syslog_variables,openlog,syslog,ftp_exec,symlink
Unix cannot auto-detect the path to mysql as the "shell_exec()" function has been disabled: checking paths hard-coded in script...

Any ideas why...and how to fix??

Thanks,

Jeff

17 Jan 2025, 2:21 PM
#277
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Backup MySQL Database

you need to talk to your hosting company.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

17 Jan 2025, 2:59 PM
#278
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

Thanks for mentioning this carlwhat.

I see that now calling up this plug in only has the one warning:
PHP-Disabled Functions: ini_alter,system,passthru,shell_exec,leak,listen,chgrp,apache_setenv,define_sysl og_variables,openlog,syslog,ftp_exec,symlink

I have tried backing up and it worked perfectly.....again no error log, just this error showing at the top of Admin page

Anything that needs dealing with??

17 Jan 2025, 3:21 PM
#279
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Backup MySQL Database

Since the script attempts to auto-detect the tools with shell_exec every time, that message will always show while shell_exec is disabled.
As you've seen, shell_exec is not necessary for restores/backups.

The message could be formatted as a caution instead of an error message to be less unsettling.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Jan 2025, 3:35 PM
#280
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Backup MySQL Database

Thanks for your reply Torvista and letting me know that this won't affect the operation of the plugin.

Much appreciated!