Totally Zenned
- Join Date:
- Sep 2010
- Posts:
- 611
- Plugin Contributions:
- 0
BackUp ZC [Support Thread]
Nevermind, I figured it out. I was looking for the php memory increase in my store admin instead of my admin files. :smile:
Views: 60,195
Totally Zenned
Nevermind, I figured it out. I was looking for the php memory increase in my store admin instead of my admin files. :smile:
Totally Zenned
Backups seem to work fine, but I keep getting this error message at the top of the screen.
Warning: stat() [function.stat]: stat failed for ../extras in C:\inetpub\vhosts\mysite.co.uk\httpdocs\admin\includes\classes\archive.php on line 242
Totally Zenned
gman:
I have the same problem.
Using: Linux 2.6.18; PHP version 4.4.9; MySQL version 4.1.22; Zen Cart version 1.3.9h; browser IE8. You mentioned to check for SPL support. Did not see it mentioned in list. How do i go about activating it in my php.ini file?
Error message does not appear in admi, but found it in the /cache folder under xxxxxx.log :
[08-Nov-2010 03:04:39] PHP Fatal error: Cannot instantiate non-existent class: recursiveiteratoriterator in /home3/user_dir/public_html/admin_folder/backup_zc.php on line 44
Could you give me some guidance with this?
Change your file YOUR_ADMIN/backup_zc.php as per this thread Post 30 that should fix it for you.
Skip
• 446F63746F722057686F •
Totally Zenned
dgent:
Backups seem to work fine, but I keep getting this error message at the top of the screen.
Warning: stat() [function.stat]: stat failed for ../extras in C:\inetpub\vhosts\mysite.co.uk\httpdocs\admin\includes\classes\archive.php on line 242
That warning is saying that you asked to exclude extras directory and in fact your ZC install does not have a extras directory.
You can edit YOUR_ADMIN/backup_zconfig.php file and remove extras directory from the Set default exclude directories list.
Skip
• 446F63746F722057686F •
Totally Zenned
Cheers thanks. This is a very handy tool, is there anyway to automate it?
Totally Zenned
dgent:
Cheers thanks. This is a very handy tool, is there anyway to automate it?
I have gotten a lot of inquires about this.
Here is the response I have been giving.
As for running as a cron/automated that is not a problem, what the problem is setting it up for the users.
What I have not worked out as of yet is the level of the user.
I have supplied the user manuals for the 2 class files in the zip file that are the core of BackUp ZC with that and a little knowledge of php a cron/automation script could be made.
What I have been thinking about is adding a timer/reminder in ZC admin to tell the user they should backup.
BackUp ZC was created with the mind set of before anyone changes files of there ZC site they could back up. Also after they have added products to there ZC site they could backup the sql.
And lastly have a backup of there ZC site that is known to be up to date and with no errors.
Skip
• 446F63746F722057686F •
New Zenner
Thank you, Skipwater. It worked. Was able to complete backup. So this made a change that allowed the backup to proceed. I do not have a Go Daddy account so i wasn't sure it would work, but this work around fixes it for other hosts as well. Appreciate the prompt reply and keeps me interested in using Zen Cart. As i was using another platform before. Thanks again!
New Zenner
Super mod but not totally sure if its working correctly. I get this DEBUG log in my cache folder.
[06-Dec-2010 11:04:44] PHP Warning: unlink(.//path/to/my/cache/generated.file.tgz.tmp) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /path/to_admin/includes/classes/archive.php on line 135**
Line 135:** ```
unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp");
Backup complete site is selected
The SQL file is generated in the **/backups** which seems fine.
The **/cache** folder generates 3 files. A compressed backup, a tmp file of some sort and the log above.
I have the latest ZC.
Totally Zenned
MaximumOverload:
Super mod but not totally sure if its working correctly. I get this DEBUG log in my cache folder.
**
Line 135:** ```
unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp");
>
> Backup complete site is selected
>
> The SQL file is generated in the **/backups** which seems fine.
>
> The **/cache** folder generates 3 files. A compressed backup, a tmp file of some sort and the log above.
>
> I have the latest ZC.
Your archive file should be fine.
What has happened is if you choose gzip as and archive type it will create a temp file and when I tried to delete it fails.
Here is the fix to stop the warning and delete the temp file.
admin/includes/classes/archive.php around line 135 you will find:
```php
unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp");
Change to:
unlink($this->options['name'] . ".tmp");
That should fix the warning and remove the temp file.
Skip
• 446F63746F722057686F •
New Zenner
skipwater:
Your archive file should be fine.
What has happened is if you choose gzip as and archive type it will create a temp file and when I tried to delete it fails.Here is the fix to stop the warning and delete the temp file.
admin/includes/classes/archive.php around line 135 you will find:
unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp");
> ```php
unlink($this->options['name'] . ".tmp");
```That should fix the warning and remove the temp file.
>
> Skip
Indeed it did, no DEBUG logs and extra files generated and left behind. Worked perfectly. Thanks a million :clap:
New Zenner
Ski,
This is a great backup tool for ZC. It makes it very easy to backup the whole store and the DB. Thank you for the great job!
I do have a couple of questions though.
When I first tried this mod, and back up the database, the file name ends with ***.gzip.sql doesn't work. If I directly open this file using a text editor, such as notepad++, it shows apparently a compressed file. But if I tried to unzip the file first, then the 7-zip (latest version) told me it's a broken file. I also tried to rename this file to ***.sql.gzip, but still no good. My final solution is to edit the YOUR_ADMIN/backup_zconfig.php file. At the bottom of the file, here is my work
// Do not edit below
if ($sql_gzip == true) {
$sql_file_name = $SERVER['HTTP_HOST'].''.date("mdY-Hi").'_sql.zip'; //I have to change it from something.gzip.sql
}
Then it works perfectly.
My second question is about Go Daddy. I do have another account on Go Daddy running zen-cart 1.3.9h. I read your post #30 and compared with the files I download (version 1.0.6). I found out they are different. Perhaps 1.0.6 is already ready for Go Daddy or am I missing something?
I wonder anyone else tried this mod on a Go Daddy account and how it works? I knew the zen-cart developers do NOT recommend Go Daddy, but I also know many users are on Go Daddy including myself.
Again, thank you for this great work. It saves me a lot of time and trouble to backup. If it also works on Go Daddy, that would be greater!
Totally Zenned
Hi Skip,
The backup seems to be working fine, the file shows up in my backup directory. However, when I run backup, it takes me to a blank screen. I go back into my admin section and the backup folder is updated. Just not sure why I'm getting the blank screen. Any ideas? Thanks.
Totally Zenned
justin2010:
Ski,
My second question is about Go Daddy. I do have another account on Go Daddy running zen-cart 1.3.9h. I read your post #30 and compared with the files I download (version 1.0.6). I found out they are different. Perhaps 1.0.6 is already ready for Go Daddy or am I missing something?I wonder anyone else tried this mod on a Go Daddy account and how it works? I knew the zen-cart developers do NOT recommend Go Daddy, but I also know many users are on Go Daddy including myself.
Again, thank you for this great work. It saves me a lot of time and trouble to backup. If it also works on Go Daddy, that would be greater!
I glad it worked for you.
As for go daddy I did not try to fix the 1.06 code to work on go daddy because I have no testing bed.
The simple reason it would not work is because go daddy has a folder owned by root in each web sites tree. And I used RecursiveIteratorIterator to get the ZC file tree and it dose not like it when the user has no rights to a folder. I have added an error for this Directory [%s] contained a directory we can not recurse into.
If you install 1.06 on go daddy and get the error then you have to edit the code as shown in your post #30
Skip
• 446F63746F722057686F •
Totally Zenned
joyjoy:
Hi Skip,
The backup seems to be working fine, the file shows up in my backup directory. However, when I run backup, it takes me to a blank screen. I go back into my admin section and the backup folder is updated. Just not sure why I'm getting the blank screen. Any ideas? Thanks.
You should try and increase the memory for php. This can be set in backup_zconfig.php.
// ***********************************************************************
// Grab a large chunk of memory
// If your server allows this adjustment then adjust to meet your needs.
// ***********************************************************************
// ini_set("memory_limit","128M");
// ini_set("memory_limit","192M");
// ini_set("memory_limit","256M");
ini_set("memory_limit","512M"); // default
// ini_set("memory_limit","768M");
// ini_set("memory_limit","1000M");
Some times based on the server you can change the compress level to a higher number. (That only applies to zip files)
This can be set in backup_zconfig.php.
$compress_level = 5; // 1-9 1 lowest 9 highest only works with zip file
Skip
• 446F63746F722057686F •
New Zenner
Just tried to install BackUP ZC and am getting the following error message when I click on the Admin tools button:
Parse error: syntax error, unexpected '{' in /homepages/.../backup_zc.php on line 65
Totally Zenned
Jim Nelson:
Just tried to install BackUP ZC and am getting the following error message when I click on the Admin tools button:
Parse error: syntax error, unexpected '{' in /homepages/.../backup_zc.php on line 65
Sounds like you are running a PHP version less then 5
What version of PHP are you running?
Skip
• 446F63746F722057686F •
New Zenner
Version pup 4.4.9
Totally Zenned
Jim Nelson:
Version pup 4.4.9
You should up grade your php to at least 5.2.9
If you can not let me know.
Skip
• 446F63746F722057686F •
Totally Zenned
skipwater:
You should try and increase the memory for php. This can be set in backup_zconfig.php.
// ***********************************************************************
// Grab a large chunk of memory
// If your server allows this adjustment then adjust to meet your needs.
// ***********************************************************************
// ini_set("memory_limit","128M");
// ini_set("memory_limit","192M");
// ini_set("memory_limit","256M");
ini_set("memory_limit","512M"); // default
// ini_set("memory_limit","768M");
// ini_set("memory_limit","1000M");
>
> Some times based on the server you can change the compress level to a higher number. (That only applies to zip files)
> This can be set in backup_zconfig.php.
> ```php
$compress_level = 5; // 1-9 1 lowest 9 highest only works with zip file
Skip
Hi Skip,
I've made the changes but I get the same effect. =( only now it doesn't backup at all. When I run the backup it leads to a blank page. if I elect to download the backup, when I try to download the file it leads to a blank page as well.
Any idea??
Totally Zenned
joyjoy:
Hi Skip,
I've made the changes but I get the same effect. =( only now it doesn't backup at all. When I run the backup it leads to a blank page. if I elect to download the backup, when I try to download the file it leads to a blank page as well.
Any idea??
How large is your site total in MB?
If you select a folder say that is 30MB or less and try to backup or download dose it work?
It sounds like changing the memory used is not allowed on your server.
Skip
• 446F63746F722057686F •
Tell staff why this post should be reviewed.