Wednesday 4 November 2009

Joomla Backup and Restore

Joomla Backup and Restore
We have been testing backup and restore tonight on my hosted site to a localhost. It didnt go quite to plan and we will try and post where we went wrong to try and help others.

Create a backup of your database. We are not experts and used the hosting company to help us out.

* We had to use a command line to get the database as we could not use phpMyAdmin with our hosting company.
* We used SSH Secure Shell from http://www.ssh.com/ - Tomorrow we are going to be testing Terminal on a mac to see if it works and also to restore the site on a mac rather than Windows Vista.
* Once connected to your host run the following command:
* mysqldump --host=xx.xx.xx.xx -u username -p database_name > dbbackup.sql

This will create your database backup, ours was in the root of the host connection.

FTP all the files from your host to your local computer, We just created a C:\website_backup\ directory and took ALL files from my host to my local.

Our local machine has WAMP installed so we copied the web files to WAMP\WWW\
Then we ran phpMyAdmin and created a new database and also created a new user. Make sure you copy the encrypted password down as you will need it for the configuration.php file.
We then imported the database to the newly created one.

This is where the fun started for us.
You have to edit your configuration.php file so that you have the "localhost" details rather than www.yourdomain.co.uk and your database names and users are as your new ones.
Good post available here at the Joomla forum on what needs to be changed

I was still getting Server 500 errors and after much head scratching remembered about reading the log files !!!

It was in there that we spotted that the local site was having problems with the .htaccess file. It was changed on the hosted site by our developers to work with the hosting partner and enable SEO.
Error was "C:/wamp/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration"
I renamed the file OLD.htaccessOLD and my site came to life.

Worth mentioning that the backend administration used the same username and password as the hosted site.

SkyeMax2002 hope that this post may help other Joomla users when trying to test backup and restores of their websites.

With thanks to our hosting partner at www.openbynature.co.uk for all their help with the command line information.

Now that we are getting a bit more confident with the backup and restore we will be pushing hard to get www.skyemax2002.co.uk up and running so you can come and see the USB Memory sticks that we will be selling.

Yours,
SkyeMax2002

No comments:

Post a Comment