Difference between revisions of "Backup Basics for a Joomla! Web Site"
From Joomla! Documentation
m (→Database Backup Part 1 of 2)
|(One intermediate revision by one other user not shown)|
|Line 15:||Line 15:|
== Database Backup Part 1 of 2 ==
== Database Backup Part 1 of 2 ==
One of the first steps to backup your Joomla site is to close the site to the public, backup the files, and then re-open the site. The steps from phpmyadmin.net omit this much needed operation. Go to the backend of your Joomla control panel, under global configuration, under the site tab, set "site offline" = yes. This will then change the look of your configuration.php file in the root of your Joomla website. An administrator will need to use your hosting control panel to view that file or use FTP to download and view the file. Inside configuration.php you can find the name of your database that will need backing up. Look for the line with code resembling "var $db = 'x1234';" Where x1234 is the name of your database.
|Line 38:||Line 38:|
== More Backup Documentation ==
== More Backup Documentation ==
There are several
There are several automated backup extensions for Joomla.[http://extensions.joomla.org/extensions/access-a-security/site-security/backup Backup ].
Revision as of 00:51, 4 October 2013
Always keep a recent backup of your site. There is more to backup than accidents. Accidents do happen, but there are many other reasons it helps to have your backup files handy before the need arises. The causes of data loss are many. Joomla sites can be compromised by malicious attackers if the site administrator has not paid attention to security, or in rare cases when hackers bypass the best security. Joomla is designed for teamwork, and even good editors can make an error to harm the site. There are many reasons website administrators need to revert the site back to a previous working state.
It helps to practice both backup and restore. Nobody should wait for an emergency to test their skills and tools for dealing with an emergency. Very often people create a backup of something that is empty or corrupted, and discover that none of their critical data was really backed up in the first place. Nobody likes a ship that sinks with empty lifeboats, and it's also wise to practice getting people out of the lifeboats and into a new working system. Having a backup is not just about accidents, because a person well versed in backup can help with safe development of new features. Backup and restore help web managers create a staging website where new changes can be practiced without risking the production website. The clone can be created on a local machine acting as a test server, or any other folder or web hosting account supporting the SQL and PHP versions used by the site you've backed up. It's easy for anyone to mix up their live site and staging site, so change the color of your staging site template to remind developers that the staging site is not live to the public.
There are two parts to a complete back up of your Joomla site
a) The database information, most often found in your mysql database
b) The files and folders on your website, as hosted on most static html websites
Database Backup Part 1 of 2
One of the first steps to backup your Joomla site is to close the site to the public, backup the files, and then re-open the site. The steps from phpmyadmin.net omit this much needed operation. Go to the backend of your Joomla control panel, under global configuration, under the site tab, set "site offline" = yes. This will then change the look of your configuration.php file in the root of your Joomla website. An administrator will need to use your hosting control panel to view that file or use FTP to download and view the file. Inside configuration.php you can find the name of your database that will need backing up. Look for the line with code resembling "var $db = 'x1234';" or "public $db = 'x1234';" Where x1234 is the name of your database.
Server SQL databases can be backed up without PhpMyAdmin and instead using the SQL command line. If you know how to do that, you're most likely not in need of this documentation.
File System Backup Part 2 of 2
Continue with your site offline, see above. Your joomla folder and files can be backed up by downloading them with an FTP utility or using the file manager of your webhosting company. Both of these file options work, neither is better.
FTP tools move thousands of Joomla files and use more time. The FTP process can be slow and interrupted. Many Joomla sites are hosted by providers like godaddy or hostgator who provide a control panel for taking thousands of files in one folder and then creating a zip file very quickly. This means your site is offline for a shorter amount of time, and you have only one zip file. Go to your hosting control panel and look for their file manager icon.
If you use your hosting file manager, practice using that interface to select your server folder and creating a zip file. Download the zip file locally and then expand it locally to to see what files are inside that zip file. This option also let's you expand the same zip file for restoration to a staging site.
Backing up the Joomla files with FTP is no different than backing up a static HTML website. Download all the files and folders that exist in the main Joomla directory. The downloaded locaiton is a folder on your local computer. Be sure that the file and directory structure remains the same as it is in the live site. When you restore the files, you will use the FTP utility to upload the files to a new server.
As soon as you've downloaded your files via zip or FTP, change your site to be online.
More Backup Documentation
Most administrators of a Joomla website have access to their MySQL data using the GUI interface called PhpMyAdmin, see How can I backup my database or table? for more information.
Automated Backup Tools
- Akeeba Backup produces a .jpa file that you should download to a safe location that's not on your webhost or webserver.
- The .jpa file contains all the folders/files and database files.
- The .jpa file also contains an installer
These paragraphs are about backup, but it's worth a quick note that the Akeeba restore process is a fast guided process similar to a setup wizard. Place 2 files on a new webhost. a) your JPA file and b) Kickstart.php (from Akeeba) You then use a browser to launch the restore process and unpack the .jpa file. Please read the Akeeba restore documentation.
Akeeba and other backup extensions can be download from