JoomlaPack
From MhWiki
JoomlaPack compresses all the files and database tables of a current Joomla install into a downloadable archive file (current version 2.0.1). It's ideal for backing up a site (although there is currently no automatic call or chron job script), moving an installation to a new hosting space, or cloning an installation. Backup archives are in the ZIP format (requires PHP 5 or hirer) or JPA - a format specific to JoomlaPack.
For instructions on creating multiple copies of a site, see JoomlaPack Cloning which details the process.
Contents |
Installation
A current version is available from the project site on Joomla Code Forge. It's installed using the default extension installer in the Admin area Extensions>Install/Uninstall.
Configuration
Once installed, JoomlaPack only requires a couple of tweaks. The following steps should be completed before using the component:
Create Separate Backup Directory
Using an FTP client (like FileZilla), create a directory in the root folder of the site (in most cases /public_html/) called "backup". FTP access details should be included in the site_notes.txt file for the site. This ensures that no Joomla files or folders are compromised in the backup process.
Configure JoomlaPack
In the admin, go to Components>JoomlaPack to bring up the component control panel. Click the configuration icon to bring up the setup options.
Under the Basic Tab correct the path to the backup directory. The default is something like "/home/accountname/public_html/administrator/components/com_joomlapack/backup". This is an absolute path indicating the location of the directory on the server itself. Since you created a directory for the backup archives in the last step, you'll want to correct this path to this. In the case above, it would be "/home/accountname/public_html/backup".
Next, scroll down and open the Advanced tab. Change "Archiver engine" from "ZIP, using PHP functions" to "JPA JoomlaPack Archive". Due to limitations in the zip libraries of PHP, certain versions will not produce a ZIP file that can be restored. To avoid this, it's better to use JoomlaPack's own archive version.
You might also want to increase the maximum archive size in "Size quota, in Megabytes" if your site has a lot of media and images or tons of components. You can often find how big your site is by checking in the site control panel using a tool like CpanelX. While the archive will be compressed, your maximum file size should be at least half the disk space and database size added together.
Save server space by limiting the number of backups it keeps on hand in "Maximum number of backup files to keep". Usually, three backups at once are enough protection.
You should also consider setting "Force database keep-alive during long operations" to "Yes" because MySQL is known to kill database tasks in the middle if it reaches a certain time limit
That's it. You can now use JoomlaPack.
Usage
Creating a Backup File
This is a pretty easy component to use to backup any site. Most of the tasks are self-explanatory. Click Backup Now on the control panel to run the script and create a backup. The script runs in an AJAX window, so it's important not to navigate away from the page while it's running. When it completes, you can use your FTP client to download the archive from the /backup directory or you can use your browser to download the file from the list in the Administer Backup Files tab (or click the icon on the control panel).
Restoring a Backup
The following instructions will help you restore a backup of a Joomla site. It's not quite as easy as creating a backup, but JoomlaPack makes it much easier than a purely manual process.
Partial Restore
You can manually restore part of a site if you know which part is broken or corrupted. In order to do this, you will need a ZIP type archive file created by JoomlaPack. Unzipping the file on your computer will provide all the site files and a SQP dump file. You can use your FTP Client to upload replacement files for missing or corrupted versions and use a database management tool like phpMyadmin to run SQL commands copied out of the SQL dump file to restore db tables. These processes are time-saving, but they are technical, so you may want to contact the Lead Developer before you do any of this.
If more complete instructions on the method, see the JoomlaPack Documentation.
Complete Restore by Site Overwrite
If you can access the Administrator of the site, you can begin the restore process from within JoomlaPack. This works if the admin is working but the frontend of the site is corrupted and needs to return to an earlier backed-up version.
To begin, go to Components>JoomlaPack and then "Administer Backup Files" from JoomlaPack's control panel. Check the box by a backup file and click the "Restore" icon on the top toolbar. JoomlaPack will being the process and give you a password. Write this down since you will not be able to access the restore script without it (it is case sensitive).
This method writes kickstart.php to http://thesite.com/administrator/, associates it with your backup file, and password protects it. As it restores the site, it will overwrite all existing files and copy over the existing database. Since it does this, you can skip to #Kickstart below and continue the process.
Complete Restore to Blank Space
In many cases, your site may be too damaged or too corrupted to simply overwrite a few files. For example, the system may be so corrupt that you cannot access the Administrator. In this case, it's better to start with a clean hosting space and restore the site from an archive file. To do this, you will need:
- An empty directory on a hosting space. Use your FTP Client to remove all files and folders, or use a File Manager if the hosting space has control panel software like CpanelX (the second option is faster). It's ok to have some files and folders in place, but you shouldn't have a Joomla install in the directory since file permission problems could prevent the cloned files from being copied. Also, installing over an existing installation has been known to invalidate all the user password hashes, so empty space is best.
- The archive of the old site which includes a SQL dump file that will insert tables into a database (db). This means you need a empty db created on the hosting space or you need to drop all tables in the existing db. You can do this using a tool like phpMyadmin. Create a MySQL db with at least one password-protected user. Record the db name, user, and password for later in the cloning process. If you need instructions, see Create a MySQL DB.
- You'll also need a copy of JoomlaPack's Kickstart script. You can get the latest version from the JoomlaPack Forge on JoomlaCode, or you can check our File Repository for kickstart.php. If you download the Forge version, you will need to unzip the file on your computer before attempting to use it.
Put files in place
You'll need to upload two files to the base directory of your site:
- kickstart.php (either downloaded and unzipped from JoomlaPack Forge or downloaded from this site)
- A JPA or ZIP archive file containing a complete site you either created or downloaded.
Uploading the archive file will likely take a while since it should be pretty big. If it's not, check the archive since it might be corrupt. Go grab a cup of joe and let your FTP Client do the work.
In most cases, you will want these files in the root directory (in most cases /public_html/) unless you plan on running joomla in a different folder or on a sub-domain. Where you place these files is where you will get your Joomla install.
Run Kickstart and JoomlaPack Installer
Two scripts need to be run for the archive to be unpacked and made opperational on your new space: KickStart and the JoomlaPack Installer.
Kickstart
Once both files are uploaded, direct your browser to kickstart.php by entering a URL that looks like this: http://thesite.com/kickstart.php. In cases where the domain name is not yet associated with the site space, you may be able to access the script at the server address like this: http://mecca.fastsecureservers.com/~thesite/kickstart.php.
Check the following and then click the big green "Start" button:
- The right JPA or ZIP archive should be indicated in the drop-down box. Double check it.
- Operation Method should be set to "AJAX (refreshless).
- Extraction Method should be set to "Write directly to files".
When you click "Start", you should see a status screen while KickStart works at putting files in place. You'll see the following message when KickStart finishes:
Please click here to open JoomlaPack Installer restore script in a new window. DO NOT CLOSE THIS WINDOW!! When you have finished restoring your site please click here to activate your .htaccess (if you had one in the first place) and delete the backup archive and this script.
Click the first link to launch JoomlaPack Installer in a new browser window or tab.
JoomlaPack Installer
If you've ever done a manual install of Joomla, this should look familiar. This is a slightly modified version of the default Joomla installer. At this point, all the files of your site are in place, but the database hasn't been written since Joomla doesn't know the proper site configuration. This wizard will help with that, but there are a few major settings we have to adjust in order for the clone to work correctly.
You probably don't need help with the "Choose Language" page, so we'll skip explaining that.
You only need worry about the top section of the "Pre-restoration Check". If any of these variable have a red "No" beside them, STOP and contact your Lead Developer, there is a major issue with the hosting space where you are trying to install. If you have all green "Yes" values, click "Next" at the top.
Read the License (quickly) and click "Next".
Now comes the important part, Database Configuration. You're going to need the db name, username, and password from setting up the MySQL database. If you followed our process, they should be recorded in the site_notes.txt file.
In most cases, you will see the settings for the site used to create the clone, so this must be corrected for this site. The important thing is to change "User Name", "Password" and "Database Name" to the new values so Joomla can talk to the db.
Once your confident these values are correct, click "Next". The script will attempt to communicate to the db. If it cannot, you will see a message in the next window that looks like:
Unable to connect to the database:Could not connect to MySQL
If this appears, click "Previous" and double-check your settings. If you still can't figure out the issue, STOP and contact the Lead Developer.
If your settings are successful, you should see a progress bar as JoomlaPack Installer writes the SQL dump file to the db.
You can skip the FTP Configuration page.
On the Main Configuration page, you should modify the site name and create the "admin" account.
The email address of the admin account shown will likely be the address of the source site's admin. If you downloaded a MuddyHudson Clone Source File, the email field should say "admin@muddyhudson.com" and the user mhadmin should already exist in the system.
In all cases, you should create a new "admin" account now, even if you modify or delete it later so you have access to the site even if something went wrong. Delete the email address and use your own email and a unique password. DO NOT use an email address already assigned to a user on the site becauase this will corrupt that user's password hash and lock you out of the site. Use an original email even if you keep this account in the system only temporarily.
Record this so you can get into the site.
Clean Everything Up
Go back to KickStart's window and click the second link now. This should remove the following from the site:
- The /installation/ folder that contains the Joomla install scripts.
- The archive file used to create the clone.
- The KickStart script itself.
When it completes, you should see a window that says "All Done".
At this point, you may wish to visit the site in your FTP Client just to make sure everything was cleaned up. The scripts used in this process will leave your site insecure if left on your server.
If you attempt to visit the frontend of the site and get the JoomlaPack Installer, this means you still have the /installation/ folder and it must be deleted for the site to be accessible and secure.
Additional Functionality
JoomlaPack can also be used to create copies of sites to use as a shortcut in development of a similar site. For more on how to do this, see JoomlaPack Cloning.


