Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 08:12:20 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155534 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: Enhanced Backup Module  (Read 5077 times)
mjm4842

Offline Offline

Posts: 227


« Reply #25 on: September 09, 2010, 04:26:32 PM »

Hi Mike,

Thank you for sharing some additional details regarding your issue.

The PCLZIP library is the same library which is used to install WebsiteBaker modules and templates on your server. If these functions are working properly for you, chances are pretty good that this should work for you as well.

Version 2.8.0.2 of the backup tool used the exec command to shell out to the external unzip program. The latest version 2.8.0.4 uses the PCLZIP library to avoid problems people had with the exec or system commands.

I scanned the source code for the PCLZIP library. According to your error message and the source code for the library, your problem is either being caused by not being able to create the ZIP file (a permissions issue) or not being able to add files into it (a disk space issue). The next step will be to connect to your server and:

1) Check available disk space. If you see a whole bunch of ZIP files, especially tiny ones (like 0 bytes in size) which were created by your test, I am guessing you are probably out of disk space.

2) Check permissions. One sign of insuffucient rights would be if you don't see a bunch of ZIP or temporary files there. You, as a user, may have sufficient rigths yet the webserver might not.

If there are large files, we will have to look at other possible causes. There could be other reasons however I would start with these two.

Hope this helps. Keep at it. I can't promise there will be a solution for you at the end but chances are pretty good that we will find the reason.

With best regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Hans

Offline Offline

Posts: 565


« Reply #26 on: September 10, 2010, 12:33:23 PM »

Hi
see: http://www.websitebaker2.org/forum/index.php/topic,18902.msg128783.html#msg128783
Tried again after clearing cache and so on. I see that the zip has been made and saved in the root of the website. I only cannot download it from my browser (blank page).
Regards
Hans
Logged

Hans - Nijmegen - The Netherlands
mjm4842

Offline Offline

Posts: 227


« Reply #27 on: September 10, 2010, 03:33:17 PM »

Hi Hans,

1) How long does your browser wait before it gives up? If the script or your browser gives up before the download starts, you will see nothing on the screen. Also, it can take a while for the server to create the ZIP file. During that time, all you will see is a blank screen so you really need to watch the status indicators of your browser (often in the status bar) to see if has timed out.

2) About how big is the ZIP file? I have downloaded files up to about 1 GB but I also have a pretty good hosting service for my site.

3) Which web browser and operating system are you using? I experienced the blank screen issue during development. It seems to happen if the website starts by sending you anything other than the the header for the download. I resolved the issue with all of the browsers I have on my computer however there may be some compatibility issues wth other browsers that I am not yet aware of.

Best regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
mikebichler

Offline Offline

Posts: 25


« Reply #28 on: September 13, 2010, 06:37:23 PM »

Hi Michael!

I have enough disk space!
On my Webserver is no zip file from the backup in the root.
The backup cannot create a file on my server i think.
But it´s not further badly - i can make the backup with the ftp program.

Thank you very much for your time (-:

Best regard,

Mike
Logged
mjm4842

Offline Offline

Posts: 227


« Reply #29 on: September 13, 2010, 06:59:12 PM »

Hi Mike,

I am not sure if this is going to help but it might. Try taking a look at my new Fix Permissions tool. You will find it at http://www.websitebakers.com/pages/tools/fix-permissions.php. You'll be amazed at how many issues can be resolved with the right permissions.

I am considering placing the temporary zip file in the temp directory instead of the home directory in my next version. That way you it might work better for people who have restricted permissions in their home directory.

With best regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Paul - Westhouse IT

Offline Offline

Posts: 63


WWW
« Reply #30 on: September 22, 2010, 08:31:02 PM »

Great work on this enhancement.

Here's an idea that may help with the timeout issues, etc. I haven't fully thought it through yet, but it certainly worth looking into.

As an anternative to synchronously building and downloading the backup, allow the user to submit a file backup request, that is carried out in the background. Downloads are then stored in a "backups" directory, so that the module page can display a list of completed backups to download or delete. Looks like this would require exec, so maybe it could be an option for those who can use exec?
Logged

Westhouse IT - Professional WebsiteBaker developers for hire.
mjm4842

Offline Offline

Posts: 227


« Reply #31 on: September 22, 2010, 09:36:25 PM »

Hi Westhouseit,

Thank you very much for your suggestion. That certainly sounds like a good idea. A similar suggestion was mentioned previously, though not with the excellent suggestion for a user interface to help you manage it.

Based on the feedback I have received, less people are having problems with the PCLZip implementation than the exec approach due to restriction implemented on their server.

I am hesitant to go to back to using exec. Besides the timeout issue, moving to the PCLZip also resolve the Windows platform compatibility problem as an external ZIP command is not available. Leaving backups on the server can also lead to space issues as was the case with another member in this forum who didn't have enough free disk space until he deleted some rather large files. I also have to wonder if the exec'd process might also be killed with the timeout.

One of the challenges I have had in my attempts to resolve the timeout issue is that I have been unable to reproduce the issue. I guess my hosting provider must have me on some pretty good equipment.

Thanks again for offering your very interesting suggestion. I will give words serious consideration.

With warmest regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Paul - Westhouse IT

Offline Offline

Posts: 63


WWW
« Reply #32 on: September 22, 2010, 09:54:25 PM »

It looks to me like you were spot on with moving the PCLZip, so I wouldn't want things to go backwards. Perhaps this suggestion is one of those extra options that could be added in the future so users can choose which method they want to use. Perhaps it might work with a remote storage solution like Dropbox for storing the backups.

Since I tend to forget to do backups often enough, I'll be working on auto-backup soon. The scripts on my local server work well, but I'm not sure I'll be able to use rsync on the hosting server(s) for file autobackups with rotation. Automysqlbackup may run into similar problems. I'll start a thread at some point when I get started working on this.

Keep up the good work on this enhancement!  grin

Paul
Logged

Westhouse IT - Professional WebsiteBaker developers for hire.
Snooops

Offline Offline

Posts: 2


« Reply #33 on: December 01, 2010, 05:41:57 PM »

Hi if i do the file backup i get a zip file with a size of 20bytes. the functions exec is runable and the command zip exists. Any idea?
Greets Snooops
Logged
Paul - Westhouse IT

Offline Offline

Posts: 63


WWW
« Reply #34 on: December 01, 2010, 06:23:55 PM »

Snoops, your post reminded me about this thread.

I now have weekly auto-backups set up using a script I found. It works for sites using cpanel. I've set mine up to save the gzipped file to a folder on the server and then send me an email when completed.

http://www.justin-cook.com/wp/2006/12/27/automatic-cpanel-backup-domain-mysql-with-cron-php/
Logged

Westhouse IT - Professional WebsiteBaker developers for hire.
mjm4842

Offline Offline

Posts: 227


« Reply #35 on: December 01, 2010, 07:03:11 PM »

Hi Snooops,

If you are using the latest version of the backup module, everything is done in PHP. It no longer requires the ZIP command nor does it require the exec function to be enabled.

If you file is only 20 bytes, it sounds like it could either be:
1) A rights issue (can create the file but not append to it)
2) You are out of disk space.
3) Your file backup is so large that the script is timing out.

This last cause however usually results in a larger file being left behind. Many hosts set the timeout for a script to be about 2 minutes though some will keep it down to 30 seconds. While the script does attempt to override this setting, this override will only work if the hosting provider has not disabled that functionality in their configuration.

Please remember that the current version of the backup module does full backup of all files in your web space, not just the files that belong to the WebsiteBaker site so backups may be larger than you'd expect if you have large or many downloads, blogs, etc. on your site.

Hope this helps. Best regards,

Michael

Hi if i do the file backup i get a zip file with a size of 20bytes. the functions exec is runable and the command zip exists. Any idea?
Greets Snooops
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
maier-tech

Offline Offline

Posts: 53



« Reply #36 on: December 02, 2010, 07:06:44 AM »

Hallo,

if there are really server issues preventing the backup-script from running properly, you can try this:

http://www.m-netze.de/pages/posts/websitebaker-sichern-7.php

This tool is running from the client and backups database and web-content to one zip-file. It is using mysqldump and wget and is running indepently from any server functionalities. A fully automated backup is there only possible if the mysql-server can be reached from "outside". This tool is written in german.

Best regards,

Klaus  smiley
Logged
NorHei
Forum administrator
*****
Offline Offline

Posts: 485


WWW
« Reply #37 on: January 11, 2011, 06:16:52 PM »

Its just an Idea , but maybe it would be helpfull to use  mysqldumper as a basis for this module as it has all problems solved including timeout problems.

 http://www.mysqldumper.de/
Logged

It is easier to change the specification to fit the program than vice versa.
mjm4842

Offline Offline

Posts: 227


« Reply #38 on: January 12, 2011, 02:19:42 AM »

Hi NorHei,

I have not heard of anyone having problems with the MySQL database backup. Where people run into problems is with the file backup which can timeout if you have a lot of or very large files on your website.

If you are experiencing an issue with the SQL backup, please let us know.

Best regards,

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
maier-tech

Offline Offline

Posts: 53



« Reply #39 on: January 12, 2011, 07:30:37 AM »

Hallo Michael,

I do have the problem with the SQL-backup at one customers site. But the reason for it is the extreme slow server of the provider combined with a extreme short time-out. That's a problem of 1&1 (the name of the provider) and the customer will move to another provider. Normally it works perfectly.  smiley

Kind greeeez,

Klaus
Logged
NorHei
Forum administrator
*****
Offline Offline

Posts: 485


WWW
« Reply #40 on: January 12, 2011, 08:03:29 PM »

Same problem on Strato Servers. So be carefull.
Some clients of mine had that problem on medium and big sites 100+ Pages.

The second point is that the technic they use to solve the timeout problem whith large mysql dumps can be helpfull for large amouts of files i guess.
 
Logged

It is easier to change the specification to fit the program than vice versa.
mjm4842

Offline Offline

Posts: 227


« Reply #41 on: January 13, 2011, 05:20:25 AM »

Thank you for your feedback. I will look into this.

Michael
Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
mikejd

Offline Offline

Posts: 160


« Reply #42 on: September 13, 2011, 01:15:20 PM »

I have installed this module on my site and tried to run it. The backup of all files was running for over 20mins with no way to check progress, so I didn't know if it was working correctly and I cancelled it. Similarly the backup of database was running for over 10mins.

What is a reasonable time to expect for a backup? I realise it will depend on the size and number of files but is 20mins or more reasonable?

Also where are the backup files saved to? Can I change this if I wish, where can it be set?

regards,
Mike
Logged
mjm4842

Offline Offline

Posts: 227


« Reply #43 on: September 15, 2011, 04:32:35 AM »

Hi Mike,

Unless configured otherwise, I think the longest a script will run is about 5 minutes. I say this because it is typically more a limitation of the servers configuration more than a limitation of the script.

Do you know about how big your site is in Megabytes for the 1) files and 2) database? Keep in mind that you need to have a fair amount of free space to ensure that there is anough space for the compressed ZIP file to be created.

Last, check in the root of your website to see if there might be a temporary file there.

Best regards,

Michael
« Last Edit: September 15, 2011, 04:35:02 AM by mjm4842 » Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
frank

Offline Offline

Posts: 35


WWW
« Reply #44 on: October 17, 2011, 09:03:27 AM »

Hi all,
I still get the message:
Error : PCLZIP_ERR_READ_OPE N_FAIL (-2) : Unable to open archive 'WebsiteBackup_2011-10-17-1318838506.zip' in wb mode

All mentioned actions above I checked, but nothing works.

Frank
Logged
hillschmidt

Offline Offline

Posts: 29


« Reply #45 on: January 24, 2012, 11:26:51 AM »

Just tested the module v.2.8.0.4 under
CMS Version 2.8.2
Revision 1506
Admin version 1.6
and it worked PERFECT! Got an sql execution file and (file backup) a .zip for all my files.

Great work & thanks!
Logged
frank

Offline Offline

Posts: 35


WWW
« Reply #46 on: March 26, 2012, 09:29:39 AM »

Yes, it works.
But not on all spaces.
Which module is missing when I get "PCLZIP_ERR_READ_OPE N_FAIL" ?
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #47 on: March 26, 2012, 10:51:54 AM »

The PclZip is a lib used by WB to extract files. PCLZIP_ERR_READ_OPE N_FAIL is a constant defined by this lib.
Logged

Alle großen Veränderungen beginnen im Kleinen
Sherlock

Offline Offline

Posts: 6


« Reply #48 on: April 30, 2012, 03:33:49 PM »

Hi

I am new to this and when I tried to back up my files message was "Please be patient might take a while" so for so good, after a short delay it closed the admin side and opened up the front page.

However I can not find a zipped file on the server.  Where have I gone wrong?
Logged
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!