Forums / All Other Contributions/Addons / BackUp ZC [Support Thread]

BackUp ZC [Support Thread]

Results 1 to 20 of 286
29 Aug 2010, 22:55
#1
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

BackUp ZC [Support Thread]

This is the support thread for BackUp ZC.

Here is a link to BackUp ZC in the free software addons section.

BackUp ZC adds a 'Backup Zen Cart' option under Admin->Tools It allows you to backup your Zen Cart database and has options to do selective directory backups, selective file backups.

The ability to store the backup file on the server or download the backup file.

Optional archive file types zip, gzip, tar.

If you have any question/issues please post them here in this thread.

Skip
30 Aug 2010, 12:33
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Posts:
19,793
Plugin Contributions:
2

Re: BackUp ZC [Support Thread]

Excellent mod that works as advertised and should save a lot of Zenners a lot of trouble by making it easy to backup their stores regularly. Great job.
05 Sep 2010, 21:16
#3
thomaswhiteeagle avatar

thomaswhiteeagle

New Zenner

Join Date:
May 2007
Posts:
93
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

I have the latest version of zc and have tried to use this module. relevant backups and cache directories are chmod 777. When I try to do a backup it just takes me back to the admin login screen.
06 Sep 2010, 15:38
#4
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

thomaswhiteeagle:

I have the latest version of zc and have tried to use this module. relevant backups and cache directories are chmod 777. When I try to do a backup it just takes me back to the admin login screen.


Need more information:
1. Server Unix or Windows ?
2. PHP version ?
3. MYSQL Version ?
4. Zen Cart Version 1.3.9f ?
5. The browser you are using?

6. Reverts to admin login when trying to save backup archive to server ?

7. Or reverts to admin login when trying to download backup archive ?

8. Or both?

The first thing that comes to mind that might fix your issue would be to clear all browser cache and cookies.

There is a free utility CCleaner that will help you with that.

Skip
19 Sep 2010, 15:19
#5
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Hi, this will be a great, and much needed, utility, but it's not working for me. Here's the symptom and the errors.

My setup:

Zen Cart 1.3.9f, unix, MySQL 5.0.91, PHP 5.2.14, IE8

When I open Backup ZC in the admin at the bottom of notes it says "Please be patient scanning your Zen Cart directory structure." and on the right under options, it lists the file type radio buttons and under that it says "Directories Loaded ..." and everything is blank below that.

The errors are:

[19-Sep-2010 08:00:56] PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for /MYHOME/stats/error_logs' in /MYHOME/MYADMIN/backup_zc.php:84
Stack trace:
#0 /MYHOME/MYADMIN/backup_zc.php(84): SplFileInfo->getSize()
#1 /MYHOME/MYADMIN/backup_zc.php(417): directorySize('/home/content/7...')
#2 {main}
  thrown in /MYHOME/MYADMIN/backup_zc.php on line 84


Thanks.

Bill
19 Sep 2010, 22:02
#6
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

bpryor:

Hi, this will be a great, and much needed, utility, but it's not working for me. Here's the symptom and the errors.

My setup:

Zen Cart 1.3.9f, unix, MySQL 5.0.91, PHP 5.2.14, IE8

When I open Backup ZC in the admin at the bottom of notes it says "Please be patient scanning your Zen Cart directory structure." and on the right under options, it lists the file type radio buttons and under that it says "Directories Loaded ..." and everything is blank below that.

The errors are:

[19-Sep-2010 08:00:56] PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for /MYHOME/stats/error_logs' in /MYHOME/MYADMIN/backup_zc.php:84
Stack trace:
#0 /MYHOME/MYADMIN/backup_zc.php(84): SplFileInfo->getSize()
#1 /MYHOME/MYADMIN/backup_zc.php(417): directorySize('/home/content/7...')
#2 {main}
  thrown in /MYHOME/MYADMIN/backup_zc.php on line 84


Thanks.

Bill


This could be caused by a couple of things:

1. There was bug in php http://bugs.php.net/bug.php?id=51068
which I assumed was old enough not to be an issue.

2. If there is a directory contained within the Zen Cart tree you are using in that you have no access to read an UnexpectedValueException will be thrown.

My first choice would be 2 a rights issue.

Skip
20 Sep 2010, 04:27
#7
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Thanks for the fast reply Skip. I have it working and here's what it was. I noticed in the error it said "stat failed for /MYHOME/stats/error_logs". I looked in stats for the directory error_logs and there wasn't one, only "logs". I tried to create the directory error_logs to see if that's why there was a problem and for whatever reason I couldn't create the directory. It would appear to be created then when I refreshed the list it would disappear. A bit later I was trying to find an error in another mod and looked back in the stats directory to check the error log in the Logs directory, and to my surprise there was now an error_logs directory with some error logs in it for my other mod. I now just ran Backup ZC and it worked.

So it appears that the missing directory was the issue. Maybe you could check if it exists and create it if not because evidently you can't count on it being there, at least not on Godaddy servers.

Thanks again for this mod. It's working perfectly now.

Bill
21 Sep 2010, 00:30
#8
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Thank you for this great mod! But I have a problem...

It was working flawlessly, but when I tried to backup today I get an 500 error screen, it says there's an internal error with programming or site maitnenance. I know the rest of the cart is working so i don't think it's maitnenance.

Funny thing is, when I look in my directory there is a zip file there, but when I try to open it, it says its corrupted.

I have not adjusted any of the coding for Backup ZC since it has been installed.

Any ideas? Thank you!
21 Sep 2010, 01:44
#9
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

joyjoy:

Thank you for this great mod! But I have a problem...

It was working flawlessly, but when I tried to backup today I get an 500 error screen, it says there's an internal error with programming or site maitnenance. I know the rest of the cart is working so i don't think it's maitnenance.

Funny thing is, when I look in my directory there is a zip file there, but when I try to open it, it says its corrupted.

I have not adjusted any of the coding for Backup ZC since it has been installed.

Any ideas? Thank you!


Each web account gets xxxx MB of drive space. It sounds like you have maxed out your drive space.

Are you storing the files on the web server or downloading them?
Also how many total MB is BackUp ZC saying there is?

If you are backing up Zen Cart database each day and creating a zip file. Then all the sql files and all the zip files are adding up to your drive capacity. If you are downloading then the zip file will not be on the server but all the sql files will be, and they are adding up.

There is much debate on how often a backup is needed and how to store the backup information on a media that is archival.

My suggestion is that you back up once a week at a minimum, and any time you change something. Leave one backup on the server and download and archive the rest. Then and only then delete the rest off the server.

Note: BackUp ZC is a server intensive application it uses all the power that the server allows. So please run when your site traffic is low. This will help your hosting company and make for a happy server.

Skip
21 Sep 2010, 02:15
#10
joyjoy avatar

joyjoy

Totally Zenned

Join Date:
Sep 2010
Posts:
611
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Ahhhh thank you so much! Problem solved! I'm just starting out with zen cart and do backups each time I add a mod. I don't delete my backups. I purged it...and it worked!

Thank you!
22 Sep 2010, 14:53
#11
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Posts:
188
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

I'm trying to exclude my images folder from being backup. I'm not sure if I'm doing right. I'm editing the archive.php in the classes folder. Here is what I have there.

[PHP]
function exclude_files($list)
{
$temp = $this->list_files($list);
foreach ($temp as $current)
$this->exclude[] = $current;
$example->exclude_files("../images/*.*");
}[/PHP]

Is this correct?

Also it would be nice if there was a restore option, at least for the db.
22 Sep 2010, 19:03
#12
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

smoke133:

I'm trying to exclude my images folder from being backup. I'm not sure if I'm doing right. I'm editing the archive.php in the classes folder. Here is what I have there.

[PHP]
function exclude_files($list)
{
$temp = $this->list_files($list);
foreach ($temp as $current)
$this->exclude[] = $current;
$example->exclude_files("../images/*.*");
}[/PHP]

Is this correct?

Also it would be nice if there was a restore option, at least for the db.


No need to edit the class file.

To exclude more then one directory or file I had to change the exclude_files variable to an array. Note the changes below.

File YOUR_ADMIN/backup_zc.php

Find at line 62
[php]
$exclude_files = '../cache/*.*'; // Exclude cache directory as default
[/php]

Here is where you would add your list of directories/files that you want to exclude.

Replace with
[php]
// Note each directroy or file name must be surrounded with double quotes and a single comma with no space separating each.
$exclude_files = array("../cache/*.*","../images/*.*");
[/php]

This change is for the display of excluded.
Fine at line 388
[php]
echo DIR_FILES_EXCLUDED.'<b>'. $exclude_files . '</b><br />';
[/php]

Replace with
[php]
echo DIR_FILES_EXCLUDED.'<b>'. implode(",",$exclude_files) . '</b><br />';
[/php]

This change is to match backup_zc which will download the archive.
File YOUR_ADMIN/backup_zc_download.php
Find at line 61
[php]
$exclude_files = '../cache/*.*'; // Exclude cache directory as default
[/php]

Replace with
[php]
// Note each directroy or file name must be surrounded with double quotes and a single comma with no space separating each.
$exclude_files = array("../cache/*.*","../images/*.*");
[/php]


Also it would be nice if there was a restore option, at least for the db.


BackUp ZC uses Zen Carts information to understand the server and web site layout. So without a good working Zen Cart the restore can not be done. This is why there is no restore option at this time.

Skip
23 Sep 2010, 15:59
#13
smoke133 avatar

smoke133

Zen Follower

Join Date:
Jul 2007
Posts:
188
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

I add the php code like you suggested. The images in the folder are now being exclude from being backup.

The problem that the folders are still showing up on the list folders. Is there a way so that they don't show up on the list?
23 Sep 2010, 19:42
#14
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

smoke133:

I add the php code like you suggested. The images in the folder are now being exclude from being backup.

The problem that the folders are still showing up on the list folders. Is there a way so that they don't show up on the list?


I only had about 15 min to supply you a fix. I have that on my list to do. Hope to get to it tonight or tomorrow.

As always the list is longer then the hours in a day.

Skip
24 Sep 2010, 19:12
#15
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Version 1.0.5 has been submitted to the free software add ons and should be ready for download in a couple of days. But until then here is a link to BackUp ZC Version 1.0.5

Read the readme file for install and upgrade info.

Skip
02 Oct 2010, 16:11
#16
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

skipwater:

Version 1.0.5 has been submitted to the free software add ons and should be ready for download in a couple of days. But until then here is a link to BackUp ZC Version 1.0.5

Read the readme file for install and upgrade info.

Skip


Thanks for the update Skip. I was having issues again because of the "missing" error_log in the Stats directory and with this update I put the stats directory in the excluded list and it fixed my problems.
11 Oct 2010, 10:35
#17
bruce1952 avatar

bruce1952

Totally Zenned

Join Date:
Aug 2008
Posts:
828
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Having trouble getting this module to work. The error message that I am getting is below:

Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for /home/content/o/u/t/outdoorking/html/stats/error_logs' in /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php:51 Stack trace: #0 /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php(51): SplFileInfo->getSize() #1 /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php(405): directorySize('/home/content/o...') #2 {main} thrown in /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php on line 51

Any help would be appreciated.

I am on a linux server and using the latest version 1.0.5 backup zc.
11 Oct 2010, 14:01
#18
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

Bruce1952:

Having trouble getting this module to work. The error message that I am getting is below:

Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for /home/content/o/u/t/outdoorking/html/stats/error_logs' in /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php:51 Stack trace: #0 /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php(51): SplFileInfo->getSize() #1 /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php(405): directorySize('/home/content/o...') #2 {main} thrown in /home/content/o/u/t/outdoorking/html/xxxxxxx/backup_zc.php on line 51

Any help would be appreciated.

I am on a linux server and using the latest version 1.0.5 backup zc.


This sounds like the same error that bpryor post had Post 7

The fix he used
I was having issues again because of the "missing" error_log in the Stats directory and with this update I put the stats directory in the excluded list and it fixed my problems.


So add this directory /home/content/o/u/t/outdoorking/html/stats/error_logs to the excluded list and that should fix it.

Skip
13 Oct 2010, 22:14
#19
ts232 avatar

ts232

Zen Follower

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

Re: BackUp ZC [Support Thread]

Hi,

Great looking mod, thanks for contributing. I am trying to install this with a fairly modded and patched 1.3.7.1 on a system with PHP 5.2.9. At the admin screen I get a bunch of good looking info, but then over on the right hand side underneath the options box I get the error:

Directories Loaded ...
Fatal error: Cannot instantiate non-existent class: recursiveiteratoriterator in /home/visua18/public_html/tispeed/tsadmin/backup_zc.php on line 44


Any ideas what might be going on there?
14 Oct 2010, 00:15
#20
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Posts:
775
Plugin Contributions:
0

Re: BackUp ZC [Support Thread]

ts232:

Hi,

Great looking mod, thanks for contributing. I am trying to install this with a fairly modded and patched 1.3.7.1 on a system with PHP 5.2.9. At the admin screen I get a bunch of good looking info, but then over on the right hand side underneath the options box I get the error:

Any ideas what might be going on there?


You might not have recursiveiteratoriterator loaded in your php setup.

Try looking admin->tools->Server/Version Info

Scroll down to 'SPL support' and see if it is listed.

If it is not listed you will have to activate it in your php.ini file.

Skip