![]() |
A distillation of collective wisdom and best practice. Essential reading for anyone setting up on the web. |
| A repository of unique and indispensable resources available for you to download. |
If you are a member of the ‘Why are we bothering about backing up, my web host does that for me, all I want to do is run the site’ group then look away now, find your cheque book or credit card to pay someone to do it and keep your fingers crossed.
Look at the T&C from your host you may find yourself both surprised and disappointed at how they address back ups and the guarantees they make. Often it’s another opportunity for them to ‘up sell’ you their all singing and dancing service.
But remember; I am showing you how do things for FREE, so you don’t waste money on simple things you can do for yourself.
So, get down to it save a ton lot of money, and most of all sleep soundly at night.
A quick recap of how a membership site works.
Membership sites, such as one based on Drupal, run a form of content management system (CMS) software. CMS software is based on the premise that content and structure of the website is separated. Content is served from a database when it’s requested; the structure or presentation of the content is set in the CMS framework supported by the software.
So what does all this technobabble mean?
Essentially that there are two parts to your site, the content, stored in your database and the structure, created by your CMS and the way you have configured it.
So, you have two lots data to backup, so where do you go from here?
Well lets deal with the easy one first, backing-up the structure of your site.
Your CMS is the package you run and administer your website through, our Drupal installation. Once you have set the structure of your website its setup is not likely to change very often, if at all, EXCEPT that is for software updates and patches.
The decision on how and when to back up this element of your site is now all of a sudden much easier. Things don’t change often so there is less need to frequently perform a backup, maybe just when you add functionality or updates.
So how do you back up; simply download the contents of the root directory from where your program files reside with your web host, the same way as you uploaded them previously. Use your favourite ftp transfer program; I use Filezilla, or the up/download interface provided by your web host.
Once you have downloaded these files simply zip them up into an archive file, maintaining the file structure and appropriately identifying the resulting file with name, date and time etc.
So that was the easy one out of the way, now for the important part, backing-up your data.
Your data is stored in the database associated with your website and to get at it normally you would use some form of software to extract and back it up.
With Drupal it is most likely that your database is MySQL based, and most of us have access to a graphical interface tool provided by our web host to simplify dealing with MySQL. You probably have access to a cPanel admin screen were you can access phpMyAdmin.
Assuming it’s highly likely you have access to phpMyAdmin, the process is relatively simple. Select the database on the left-hand side of the screen that you want to backup, if there is more than one. Once selected you will see all of the tables it contains.
You now select the ’Export’ tab; tick the box for ‘All tables’ and hit the ‘run’ button.
The program now goes away and starts to create a backup file complete with the .sql filename extension. When it’s complete you will be prompted to save the file, simply select a location for the file to be saved to and that’s it. Job done!
Restoring your files is the opposite to the above procedure, but look out for my corresponding article to get the details explained and what to look out for.
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer