Whatever precautions you take, be prepared for catastrophes. Always have a backup ready to restore your site to its most current healthy state.
There are a few great Joomla! extensions that automate the backup process. A very popular one is JoomlaPack. It will backup all necessary files (all Joomla! files and the database contents) to recover your site. JoomlaPack will allow you to restore the backup file to any location (not just to its original location).
This is how you install JoomlaPack and create a backup:
1. Go to http://joomlapack.net to download the JoomlaPack extension file.
2. Navigate to Extensions | Install/Uninstall to install the extension.
3. Navigate to Components | Joomlapack and click on Backup Now to make a backup using the default settings. The backup should start immediately:
4. When the backup is complete, you'll see the following message:
5. To save the backup file on your computer, click on Administer Backup Files. Select the backup file and click on the Download button.
This is how you restore a backup file:
1. Unzip the JoomlaPack backup file that you downloaded to your computer earlier.
2. Using an FTP program, upload all of the files from the backup ZIP file to the original location: the web server directory where you installed Joomla!.
3. When all files have finished uploading, point your browser to the URL of your site adding
/installation/index.php
. For example: www.yoursite.com/installation/index.php.4. The JoomlaPack installer screen will appear. Follow the instructions of the installer.
There's a step-by-step tutorial on using JoomlaPack for backing up and restoring Joomla! sites at http://joomlapack.net/help-and-support/documentation/joomlapack-user-guide.html.