Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,443

Results 141 to 160 of 327
24 May 2016, 4:40 AM
#141
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Backup MySQL Database

DrByte:

Could be that your database password (in DB_PASSWORD) contains a special character that's not translating well when the backup drops out to the command-line and passes the password parameter to do the database export. Anything in there like a $ or # or back-tick or quote/apostrophe or * or & might be problematic, depending on your server operating system.

Thanks DrByte!

That was exactly it. I removed the special characters from the database password and now it works . . . Success: The database has been saved.

17 Jul 2016, 4:05 PM
#142
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: Backup MySQL Database

I just installed this, and verified that all the files were uploaded into the correct directories. I'm not seeing 'Database Backup-MySQL' in Tools (or anywhere else). I not only refreshed Zencart, but exited and reloaded it. What else do I need to do?

17 Jul 2016, 7:12 PM
#143
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Backup MySQL Database

HeleneWallis:

I just installed this, and verified that all the files were uploaded into the correct directories. I'm not seeing 'Database Backup-MySQL' in Tools (or anywhere else). I not only refreshed Zencart, but exited and reloaded it. What else do I need to do?
When say all files loaded to the correct directories, can you clarify what this means without giving away your secret admin directory? If all of the files were loaded to where they ought to go, then the option would appear on the admin. Unfortunately this plugin like one other I know of tends to be incorrectly installed into the catalog's directory path rather than the admin's directory path.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Jul 2016, 8:16 PM
#144
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: Backup MySQL Database

The instructions say: "INSTALLATION: Upload all files from the "admin" folder of this ZIP as-is to your server, retaining folder structures.

Nothing about uploading them into the admin folder. And the "admin" folder in the installation package only stipulates whether or not you're loading it into a 1.3 version or a 1.5 version. But yes, each version folder name starts with admin_zencart. I'm as literal as any other programmer, and I didn't take that to mean it was supposed to go into the YOUR_ADMIN folder.

Guess I should have figured that out, though, since it's an admin tool. I'll put the files in my admin folder.

Thanks.

And uh, yeah. The backups folder is in the admin file. Definitely should have figured that one out. Running on coffee and doughnuts right now.

And it appears to have worked.

Thanks again!

17 Jul 2016, 10:15 PM
#145
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Backup MySQL Database

Just make sure you make a run-through and verify that the backup generated will actually restore :smile:

I used one of the zencart backup plugins for quite a while until I needed to restore and none of the backups would restore. From that day 'til present, I only make database backups via phpMyAdmin

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

18 Jul 2016, 12:23 AM
#146
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Backup MySQL Database

RixStix:

Just make sure you make a run-through and verify that the backup generated will actually restore :smile:

I used one of the zencart backup plugins for quite a while until I needed to restore and none of the backups would restore. From that day 'til present, I only make database backups via phpMyAdmin

I can second that, only using phpMyAdmin these days for b'ups.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jul 2016, 9:07 AM
#147
torvista avatar

torvista

Totally Zenned

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

Re: Backup MySQL Database

only using phpMyAdmin these days for b'ups.
Not always to be trusted either...without checking.
https://community.apachefriends.org/viewtopic.php?p=247543

I always use (locally) the latest version of phpmyadmin and for the last two versions it would not restore its own backup. The current version is fixed.

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

20 Sep 2016, 12:40 AM
#148
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: Backup MySQL Database

I backup with phpMyAdmin also, and download it to the server in the office.

But I have a different problem now. I wanted to do a restore, and as soon as I clicked on the file that I wanted to restore, I was taken back to the login screen, and nothing would let me back in except restarting the program. Neither my regular login nor the master login would work. I've tried it multiple times, and it doesn't appear to be possible to do a restore through this plugin. I can do it with phpMyAdmin, but not everyone coming after me is going to be able to figure that out. I need to have all the utilities available to someone who isn't able to do more than follow directions. Pretty disappointed.

20 Sep 2016, 4:16 AM
#149
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

HeleneWallis:

I backup with phpMyAdmin also, and download it to the server in the office.

But I have a different problem now. I wanted to do a restore, and as soon as I clicked on the file that I wanted to restore, I was taken back to the login screen, and nothing would let me back in except restarting the program. Neither my regular login nor the master login would work. I've tried it multiple times, and it doesn't appear to be possible to do a restore through this plugin. I can do it with phpMyAdmin, but not everyone coming after me is going to be able to figure that out. I need to have all the utilities available to someone who isn't able to do more than follow directions. Pretty disappointed.
That's odd. I used it for a restore last week, without those symptoms.
Does it do the same redirect when you do a backup? Or only when you attempt a restore?
Any errors logged in the /logs/ folder?

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

24 Sep 2016, 12:27 PM
#150
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: Backup MySQL Database

Backing up appears to work fine. But if I click on any of those backups, or if I click on restore, the program goes back to the login screen, and the login doesn't work. No errors were generated.

25 Sep 2016, 11:13 PM
#151
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

HeleneWallis:

Backing up appears to work fine. But if I click on any of those backups, or if I click on restore, the program goes back to the login screen, and the login doesn't work. No errors were generated.
Sounds like maybe the backup filenames (which are named after your db name) might be triggering some anti-hijack rules that your hosting company has configured in "mod_security" on your server, and thus the URLs are being rejected, and then the mangled URL means ZC can't interpret the request, so it takes you to the home page.

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

28 Oct 2016, 5:51 PM
#152
utefan avatar

utefan

New Zenner

Join Date:
Feb 2016
Posts:
28
Plugin Contributions:
0

Re: Backup MySQL Database

I am seeing the same security error. @muteyaar, did you find a fix for this? Thanks.

15 Feb 2017, 4:00 PM
#153
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 made a lot of changes to this ages ago and never got round to uploading them until now:
https://github.com/torvista/Backup-MySQL-for-Zen-Cart

If you are already using the version from the Plugins with no problems, the only thing you may be interested in is the option to add a suffix to the backup filename. I find that useful prior to doing some major db import/update.

  • added option to add a suffix to backup filename
  • changed mysql to mysqli
  • added support for gzip and zip restores in windows
  • added extra tool paths to configures file to enable the same file to be used in a production and local development environment
  • moved mysql tool path defines from language files to /extra_datafiles
  • added automatic path detection to the paths checked
  • added error checks to page registration of admin tools menu item to detect incomplete installations
  • changed quote marks to single for Nix and double for Win around passwords to cope with metachars ($%<&* etc.) in passwords
  • added debug info option tickbox (at foot of file)
  • changed to html5, removed obsolete formatting tags
  • tested with php 7

The functionality this plugin offers should really be in the core. It is indispensable for repeat testing of code that modifies a database and anything that makes testing easier has to be a good thing.

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

15 Feb 2017, 4:54 PM
#154
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Backup MySQL Database

Please don't tell people to automatically use 777 permissions--for anything on a server/hosting account. That is just wrong for all kinds of reasons.

FTP programs automatically use correct permissions as defined by the server. I would suggest you tell people to use 755 permissions and if there is problem, to first look at their error logs and determine the problem. If it is a file permission only then to try 777 permissions.

The learning is in the doing.

Potent Products

15 Feb 2017, 5:35 PM
#155
torvista avatar

torvista

Totally Zenned

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

Re: Backup MySQL Database

Please don't tell people to automatically use 777 permission
Agreed...that was blindly copied from the original readme.:blink:

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

15 Feb 2017, 6:45 PM
#156
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Backup MySQL Database

Website Rob:

Please don't tell people to automatically use 777 permissions--for anything on a server/hosting account. That is just wrong for all kinds of reasons.

FTP programs automatically use correct permissions as defined by the server. I would suggest you tell people to use 755 permissions and if there is problem, to first look at their error logs and determine the problem. If it is a file permission only then to try 777 permissions.
And even then, file permissions may need 644.

My first install years back and it included other non-ZC pages, I tried 777 for folders and files. At that point, host had to go back and reset everything. Max they allowed: folders: 755, files: 644...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Feb 2017, 9:39 PM
#157
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Backup MySQL Database

That is true. I forgot I needed to specific.

So for those in doubt, default settings for properly secured Linux server are:

755 dir.
644 file

I cannot speak for Windows servers as I don't use them.

As mentioned though, FTP programs usually use the default setting of the server (regardless of OS) and that is best to start with. So don't change dir. or file permissions unless you have to!

The learning is in the doing.

Potent Products

11 Apr 2017, 5:41 PM
#158
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,453
Plugin Contributions:
4

Re: Backup MySQL Database

Hi,

Lately I'm getting the following warning when doing backups:

Warning: Using a password on the command line interface can be insecure.

Zen Cart v.1.5.4
PHP Version: 5.6.30
Database: MySQL 5.6.35

Is there a way to solve this?

IDEASLady
IDEAS Creative Studio

Your image... our business!

13 Apr 2017, 2:58 AM
#159
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Not at the present time.

.
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 May 2017, 1:06 AM
#160
idtags avatar

idtags

Zen Follower

Join Date:
Aug 2005
Posts:
315
Plugin Contributions:
0

Re: Backup MySQL Database

I installed BACKUP_MYSQL Admin Tool Designed for: Zen Cart v1.3.x and 1.5.x series on my 1.5.5. Zen Cart.

Everything appears is working fine.

But I have 2 questions:

  1. Admin->Tool menu shows sub menu "DataBase BACKUP_MYSQL" 2 times:

[Attachment no longer available]

  1. When I use both options **No Compression (Pure SQL) ** and Use GZIP generating backup is compressed in both cases.

Is this issue of installation of web hosting server software?

Any suggestions are appreciated.