Tuesday, February 09, 2010
   
Text Size

Backup now

Rate this item
(0 votes)

Backup now

Before we discuss the options on the Backup Now screen, there are a couple of important issues that we need to cover:

[Important]Important

In order for the restoration to work properly, the original site must have a readable and valid configuration.php on its root. This means that a 'trick' many webmasters use, that is providing a configuration.php which includes an off-server-root PHP file, is incompatible with the restoration procedure. The provided installers are hard-coded to look for the configuration.php in the site's root, include it and read the configuration variables off the resulting memory array. If the 'trick' has been effective on the original site, the installer will have blanks in its options and if the user proceeds with the restoration/installation procedure the site will not work as expected, as crucial options will have the default or no value at all!

[Important]Important

Do not navigate away from this page or close your browser window until the packing is complete. Otherwise, the backup process will be interrupted and no backup file will be created (or you'll end up with an incomplete backup file). JoomlaPack disables the Joomla! menu during backup to prevent accidentally switching to a different page.

Sometimes, JoomlaPack will appear to be stuck for a long time (about 2-3 minutes). This is normal and is caused on slow servers processing large files. If JoomlaPack doesn't refresh its screen for more than 6 minutes, you should navigate away from the backup page and take a look at the log file for any error messages. Always try different configuration options - especially switching to the JavaScript Redirects mode! - before submitting a bug report on our support forum.

[Important]Important

Some hosts produce warning messages that interfere with JoomlaPack's backup procedure. In order to alleviate this problem, please go to Joomla!'s Global Configuration . Under the Server tab set the Error Reporting to None and save the configuration. Keep in mind, however, that this setting disables error reporting in Joomla!, so if you are a developer you will most probably have to switch it back on at some point.

The initial backup page lets you select a backup profile, define a short description (required) and an optional lengthy comment for this backup attempt. This information will be presented to you in the backup administration page to help you identifying different backups. The default description contains the date and time of backup. The backup profile pre-selected is the one you have chosen in the Control Panel page. You can switch to any profile you wish using the drop down list. Whenever you are ready to start the backup, just click the Backup Now button.

If JoomlaPack has determined that there are confirmed or potential problems with your configuration and/or server setup, it will notify you by placing a big box on top of the form fields. This box will explicitly warn you that JoomlaPack may not work as expected and lists the detected problems. Clicking on any of the detected problems will open a pop-up window with the long description of the problem and any known workarounds. Please, read these pages. Sometimes JoomlaPack will fail because of a known error you can work around easily. Asking for help on our support forum with respect to this kind of problems is a waste of your time, as it will take at least 24 hours to tell you the workaround, whereas you could have easily read it in less than 24 seconds. That's quite a difference, isn't it?

During backup, a backup progress panel shows up. The upper sections consists of three lines, indicating each backup operation's status. The current step is highlighted in yellow with a blue arrow marker on its left. Successfully completed steps are highlighted in pale green and have a green check mark to their left. Steps not yet processed will appear in grey. If an error occurs, the step with the error will appear highlighted in red with a red X sign on its left. This will also trigger the display of an error box.

[Note]Note

Counter-intuitively, even you are backing up only your database, all steps will become green. This is neither a bug, nor it means that JoomlaPack processed your files. In fact, JoomlaPack skips over backing up your files by having the file backup operation run with the "null" algorithm. This internal algorithm will simply skip over the operation but report it complete to the backup engine, hence the green marker.

Should a minor error occur, JoomlaPack displays a yellow warning box below the status lines. This box holds at most the latest ten minor errors which may have occured during the backup process. These are also logged in the JoomlaPack Debug Log and marked with the WARNING label, that is if your log level is at least Errors and Warnings. Usual causes of warnings are unreadable files and directories. JoomlaPack regards them as minor errors because even though the backup process can go through, what you get might be a partial backup which doesn't meet your expectations. In case warnings appear on your screen you are advised to review them and assess their importance.

After the whole process is complete, JoomlaPack will clean up any temporary files it has created and empty the temporary database tables it uses. JoomlaPack will also clean temporary files and tables and delete incomplete archive files upon detecting a failure.

By that point, your site backup file has been created. You can now navigate out of the packing page and possibly into the backup administration page, clicking on the handy button which appears below the backup completion message.

[Important]Important

There have been reports that some server settings in conjunction with non standards compliant browsers prevent downloading a usable archive. After downloading your backup, test the archive file to make sure it is valid. There have also been instances where WinZip refused to extract a zip file but 7-Zip or WinRAR would extract it. Please read more about the ZIP format on the warning message which appears on the Control Panel page.

In case of backup failure

If JoomlaPack dies with an uncatchable error - for example a server timeout or a PHP error - no feedback will be given to the user. This is a limitation of the way PHP works. In such a case, revisiting the JoomlaPack Control Panel page will allow JoomlaPack to detect this error state and offer to apply one of two sets of pre-defined configuration options which are known to work on a large number of sites. This automatic problem detection and solving feature is described in the Control Panel documentation section above.

[Tip]Tip

You should try the automatic troubleshooter first. If its proposed changes do not lead to a successfull backup you can try to manually apply the proposed changes below.

Should the backup fail for any reason and in a way that JoomlaPack can detect (for example, inability to write to the output file), the error page appears. It contains the last error message reported to JoomlaPack's backup engine and a link to the log viewer page.

Depending on server setup and your site's nature, it is possible that the default options do not work for you as expected. The first line of problem solving is trying out different settings. We give you a list of settings adjustements and other actions which usually work out well for our users. You should try changing one of them at a time, until you get satisfactory results.

  • Make sure the JoomlaPack tables (starting with jos_jp_, where jos_ should be replaced with your site's database prefix) exist in your database. If they don't, you'll have to create them manually, as illustrated in Chapter 1, Section 2.2 "Common pitfalls" of the JoomlaPack User's Guide.

  • Some hosts impose a maximum file size, for example 10Mb. If the backup always hangs and the generated archive always has the same size, please contact your host and ask them if they impose such a limit. In such a case you can use JoomlaPack's archive splitting feature; just set the Part size for archive splitting to a non-zero value, according to the documentation of the Configuration page. You might consider discussing this issue with your host and even switch hosts, as split archives are harder to manage.

  • Check for any directories with a large number of files and / or big files. It's a good idea to clean or exclude cache and temporary directories (for example, the "cache" and "tmp" directories of your Joomla! installation). Also, if you have directories with huge files (for example, large videos, MP3's, big download files) it might be worth trying to exclude them.

  • If you have open_basedirs restrictions in effect, make sure that your output directory is not outside the allowed paths. The same holds true for your site's folders, especially if there are any "soft links" pointing to files and directories outside the allowed paths; PHP will resolve them to absolute paths and cause the backup to fail.

  • If you use the "[RANDOM]" keyword in your Archive Name Template, try removing it. Some hosts are not happy with filenames which are too long.

  • Try the "Joomla!-powered filesystem scanner" option in the "File list engine".

  • Try the "JPA JoomlaPack Archive" setting in the "Archiver engine" option.

  • Switch the "Backup Method" to "JavaScript Redirects".

  • If you get strange database errors, such as "MySQL server has gone away", please set the "Force database keep-alive during long operations" option to Yes. In this case, we strongly advise you to set the parameter named "Override archiver's chunk size (bytes)" (look for it in the Magic Numbers section) to a value of 262144, or - if the problem persists - to an even lower number, down to 65536.

  • If you still get timeouts, you can try tweaking the Magic Numbers section:

    • If you get timeouts (the backup freezes) please set "Maximum execution time allowance [seconds]" to 7 and "Maximum run time bias (in % of maximum_execution_time)" to 50. You can try lower values, for example 3 and 40 respectively.

    • Try using lower values in the "Maximum operations per step" setting. Many hosts require as low as 10, or even 5 steps. This takes effect if and only if you use the Smart algorithm.

    • If the "Maximum operations per step" setting does no good, try setting the "Database Backup Algorithm" or the "File Packing Algorithm" to Slow.

    • If the backup hangs during database dumping operation, please set "Maximum database rows dumped per step" to a lower value, for example 50 or even 20 (especially if you have tables with huge rows, for example articles tens of pages long, or copied and pasted from Microsoft Word).

    • You can also try using lower values for the other Magic Numbers.

If all else fails, you might have stumbled upon a bug. Submitting a bug report is really simple. Just visit the support forum and post your problem in the relevant forum. In order to help us help you, we need the following information:

  • A clear description of your problem. Saying "Um... it just doesn't work" is not a clear description. Tell us exactly what you were trying to do, at what exact operation it failed and any error messages which were output on the page.

  • Joomla! version. It is best to tell us the exact version, for example 1.5.7.

  • JoomlaPack version. It is best to tell us the exact version, for example 2.0.b1.

  • A copy of the JoomlaPack log taken with log level set to All Information and Debug when the problem happened. You can download a copy of the log from within the View Log page. If it doesn't work for you (for example, you get an empty file), the log is available inside the configured output directory, named joomlapack.log. Since our forum rejects certain file extensions, zip it before attaching it. If you are concerned about the possibility of revealing potentially sensitive information, password-protect the ZIP file and send a private message with the password, addressed to users dlb and nicholas.

  • If you are writing about an error related to the restoration process do not forget to tell us which JoomlaPack Installer is embedded in the backup and how you extracted the archive file (using Kickstart, using our UnZIP/UnJPA scripts or with an external utility).

We will get back to you promptly. It usually takes less than a calendar day to respond. If developer's support is required for your problem, the support team will forward your request to the development team and it will take an extra one to three business days to get a response. Usually, problems are solved within two days. Some pesky bugs take a little over than a week. We try to be fast with supporting you; after all, you are the reason this project exists in the first place!

Last modified on Sunday, 06 December 2009 13:03

Add comment


Nicholas' Blog

dionysopoulos.me - The web site of Nicholas Dionysopoulos and his programming projects

Affiliates

Banner

Official Blog

Our official blog is the primary resource of news regarding upcoming features. Your feedback on the blog helps us form the next version of JoomlaPack!

Sponsored links

Affiliate Sites

JoomlaTutorials
Learn how to make Joomla! work the way you want it to. Animated tutorials, tips, articles and more.
www.JoomlaTutorials.com