Forums / Addon Admin Tools / Backup MySQL Database

Backup MySQL Database

Views: 87,443

Results 121 to 140 of 327
30 Nov 2012, 9:27 PM
#121
rgriese avatar

rgriese

New Zenner

Join Date:
Nov 2012
Posts:
13
Plugin Contributions:
0

Backup MySQL Database

Thanks! I did see in my configure.php file that one of the paths is pointing to a folder "admin" that doesn't exist. I was afraid to change that in case it affected something else. However after seeing your response I guess I should try updating that path? In the meantime I created an admin dir with a backups dir under it just to get the add-on to work, but don't want to leave it like this.

And this tells me that the paths in your /clay/includes/configure.php file are pointing to the old /kunden/..../admin/... folder, instead of the correct actual folder.

1 Jan 2013, 1:51 PM
#122
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,019
Plugin Contributions:
2

Re: Backup MySQL Database

Just installed Backup MYSQL Plugin - Version: v1.5a respectively in 139h and 151 on localhost running xampp 1.7.7.

Works fine in 151, but fails in 139h with following error message.

Warning Result code: 1
Error Failure: The database has NOT been saved.

From Language file
define('LOCAL_EXE_MYSQL', 'd:/xampp/mysql/bin/mysql.exe'); // localhost - used for restores
define('LOCAL_EXE_MYSQLDUMP', 'd:/xampp/mysql/bin/mysqldump.exe'); // localhost - used for backups

From Server Info
MySQL 5.5.16
PHP 5.3.8
open_basedir no value no value
safe_mode Off Off
safe_mode_exec_dir no value no value
disable_functions no value no value

DB passwords for 139h and 151 are identical, but admin logins are different.

The previous 139h version of Backup MYSQL worked fine until upgrade, but now upon reloading previous version, Backup MYSQL no longer works in 139h.

Help appreciated.

28 Jan 2013, 8:34 PM
#123
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Backup MySQL Database

... I fixed it by removing any $,!,&, etc from the password. After removing, it works perfectly.
May have a working fix for this which does not require you to change your passwords to remove punctuation. The following is working correctly in my test and production environments (LAMP stacks).

Try changing line 125 of "admin/backup_mysql.php" from:

        $dump_params .= ' "--password=' . DB_SERVER_PASSWORD . '"';

to:

        $dump_params .= ' --password=\'' . DB_SERVER_PASSWORD . '\'';

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

5 Feb 2013, 12:13 AM
#124
rgriese avatar

rgriese

New Zenner

Join Date:
Nov 2012
Posts:
13
Plugin Contributions:
0

Re: Backup MySQL Database

Is there a way to use Backup MySQL Database tool to actually backup the true data files as well? ie. Customer, Order, etc. ?

5 Feb 2013, 12:19 AM
#125
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

rgriese:

Is there a way to use Backup MySQL Database tool to actually backup the true data files as well? ie. Customer, Order, etc. ?
There are many ways to interpret your question, depending on what technical angle one reads it from, but most of those angles would never ask that question.

So, perhaps you can rephrase your question, being more specific about what you actually meant?

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

5 Feb 2013, 1:54 AM
#126
rgriese avatar

rgriese

New Zenner

Join Date:
Nov 2012
Posts:
13
Plugin Contributions:
0

Re: Backup MySQL Database

Sorry for not being more specific. When I download the .sql file after creating the backup using the plugin, it appears that there is no customer order date, address data, etc. As opposed to when I use MYphpAdmin to create a backup in which when I open the sql file I can see all the customer data. I thought that this plug in would backup the order, address, etc information. (I am just opening the file in TextWranger)

5 Feb 2013, 2:16 AM
#127
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

You didn't say whether the file was empty. but, if the .sql file is actually empty, then that suggests you've got errors occurring which are preventing any backup from happening at all.

I find it hard to believe that it doesn't contain the data that it backed up. It takes a backup of the entire database specified in your admin configure.php file ... ya, the same database that you're logging in to when you login to your admin, the same database that stores the orders and is used to display the orders.

I suspect you're misreading the data. Maybe the data is on very long lines (which makes for smaller sizes because it removes excessive repetition) and you're not scrolling far enough to the right to see the rest of the info.

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

5 Feb 2013, 2:38 AM
#128
rgriese avatar

rgriese

New Zenner

Join Date:
Nov 2012
Posts:
13
Plugin Contributions:
0

Re: Backup MySQL Database

My apologies! The file is not empty, however as you suspected it was a case of my misreading the data. The file is just formatted differently from when I do the backup from myPHPadmin and you are correct.... I wasn't scrolling far enough to the right. I saw only the parts of the file where the SQL tables were being established etc, but did not scroll right far enough to see the actual data within the tables... ie customer orders etc. Thanks for responding so quickly!

5 Feb 2013, 2:41 AM
#129
rgriese avatar

rgriese

New Zenner

Join Date:
Nov 2012
Posts:
13
Plugin Contributions:
0

Re: Backup MySQL Database

Dr. Byte, on a different and unrelated note... I am doing work for the client who has the Zen Cart installation. She would like to add some additional fields that do not already exist in the installation. (primarily product and date related) I do not have enough experience to add these fields myself. Do you or are you aware of someone who does this for a reasonable price?

8 Feb 2014, 8:11 PM
#131
silverhd avatar

silverhd

Totally Zenned

Join Date:
Mar 2008
Location:
USA
Posts:
563
Plugin Contributions:
0

Re: Backup MySQL Database

Hi:

I am having trouble with the database Backup too. After I installed it, I changed the CHMOD on the backup folder to 777. I got an error so I changed it to 755as recommended by the "read me" file. I am getting a 404 error now. Any suggestions?

Silver

14 Jan 2015, 3:08 PM
#132
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 have been hacking this about for a long time and would like people to try it out before I upload it:

2015-01-14 - v1.6
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
minor debug formatting changes
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

Note the DEBUG option is on by default.

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

5 Dec 2015, 2:52 PM
#133
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Backup MySQL Database

torvista:

I have been hacking this about for a long time and would like people to try it out before I upload it:

2015-01-14 - v1.6
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
minor debug formatting changes
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

Note the DEBUG option is on by default.

Would love to test this potential mod. Finding havng issues with current php and commands in version available online. Was going to read back to see what solutions have been offered, but saw this first. :)

Please advise how to obtain.

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

5 Dec 2015, 6:59 PM
#134
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 advise how to obtain.
Hmmm, I thought it was in my previous post, so here it is (again?):

Why this is not core functionality I cannot understand, I use it constantly to copy the production db to my development db,and do repeated restores when testing installation routines that affect the db.
It's an essential tool for me.

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

5 Dec 2015, 7:19 PM
#135
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Backup MySQL Database

torvista:

Hmmm, I thought it was in my previous post, so here it is (again?):

Why this is not core functionality I cannot understand, I use it constantly to copy the production db to my development db,and do repeated restores when testing installation routines that affect the db.
It's an essential tool for me.

Dunno what happened to it/why/how removed. But thanks. Kinda me too, been looking for a way to integrate it into some other software that modifies the database and would love to be able to call a function if the capability were present to "automatically" do a backup (bypassing the applicable question screens if installed).

Obviously haven't tried hard, but...

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

4 Mar 2016, 4:59 AM
#136
muteyaar avatar

muteyaar

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Re: Backup MySQL Database

Hi,

I have installed the tool.
It creates the backup file but also shows the error message:
Warning 0 => Warning: Using a password on the command line interface can be insecure.

Also, I tried to restore a file. It does not show any error, but actually it is not restoring the database.

I am using zencart version 1.5.4

thanks in advance for your help !!

23 May 2016, 4:16 AM
#137
zean avatar

zean

Zen Follower

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

Re: Backup MySQL Database

According to the Version history here https://www.zen-cart.com/downloads.php?do=file&id=7
Backup MYSQL Plugin - Version: v1.5a has not been updated since 2012 and is only validated up to Zen Cart v1.5.3.
Is it good for Zen Cart v1.5.5 and v1.5.5a?

23 May 2016, 4:28 AM
#138
gilby avatar

gilby

Totally Zenned

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

Re: Backup MySQL Database

Zean:

According to the Version history here https://www.zen-cart.com/downloads.php?do=file&id=7
Backup MYSQL Plugin - Version: v1.5a has not been updated since 2012 and is only validated up to Zen Cart v1.5.3.
Is it good for Zen Cart v1.5.5 and v1.5.5a?
It works fine for me on 1.5.5a

23 May 2016, 7:15 PM
#139
zean avatar

zean

Zen Follower

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

Re: Backup MySQL Database

Thanks! It is not working for me.
I get an error message and an empty gzip file saved in the admin/backups directory.
Here's the error message . . .

Result code: 2
0 => mysqldump: Got error: 1045: Access denied for user 'xxx_yyy'@'localhost' (using password: YES) when trying to connect
Failure: The database has NOT been saved.

Any ideas?

My vitals

  1. Zen Cart v1.5.5a fresh clean install including demo data; files uploaded via FTP then run zc_install
  2. Linux Apache
  3. PHP Version: 5.6.17 (Zend: 2.6.0)
  4. Database: MySQL 5.5.42-37.1-log
24 May 2016, 3:55 AM
#140
drbyte avatar

drbyte

Sensei

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

Re: Backup MySQL Database

Zean:

Thanks! It is not working for me.
I get an error message and an empty gzip file saved in the admin/backups directory.
Here's the error message . . .

Result code: 2
0 => mysqldump: Got error: 1045: Access denied for user 'xxx_yyy'@'localhost' (using password: YES) when trying to connect
Failure: The database has NOT been saved.

> 
> Any ideas?
> 
> My vitals
> 1. Zen Cart v1.5.5a fresh clean install including demo data; files uploaded via FTP then run zc_install
> 2. Linux Apache
> 3. PHP Version: 5.6.17 (Zend: 2.6.0)
> 4. Database: MySQL 5.5.42-37.1-log
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.

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