Home Resources about backups

About Web Site Backups

This page, stressing the importance of making regular backups of your site, is intended mainly for the benefit of existing Masonhost clients. It is, in fact, just a copy of an email-to-all. I should preface this by saying that a) it's very important; b) if it doesn't seem to make a lot of sense, please pick up the phone or email us, but please don't be tempted to ignore this just because it seems "techy" or a chore. It is, as I've said, about the importance, maybe even the urgency, of making a backup of your web site. I know - it sounds boring but please take the time to read this right through, today - you may just have cause to thank us tomorrow! ;-)

We recently managed to resolve a problem on one of our clients' sites due more to good fortune than anything else. The issue required that the database be restored and, in this case, we happened to have made our own copy of the client's database only a few weeks ago. We were able to merge our few-weeks-old copy of our client's database with his current-but-damaged database and restore the site to full working order without any loss of data whatsoever. This, however, has prompted us to remind all of our clients of the importance of regular backups. It is absolutely vital that you make current backups of your website files and database.

If your site uses a content management system such as Joomla, or an e-commerce cart such as osCommerce, any changes that you make to your site content - new or edited pages, new products etc. - are stored in the database. In the case of an e-commerce cart, your product data, sales records and customer data is also stored in the database. For all sorts of reasons, data can be unexpectedly lost or corrupted and, when that happens, there is generally only one way to restore the site and that is by restoring from backup. Unless you have a maintenance contract with us, it is not our responsibility to ensure that your files and database are backed up and it is not our responsibility to ensure that your backups are current.

That being said, we do not want to see any of our clients suffer a substantial setback for the want of some communication on our part. If you haven't made a recent backup of your files and your database, please do so without delay, (and continue to do so). If you have any questions about making backups, please just pick up the phone or email. Making regular backups is not a difficult thing to do and it's not time-consuming but it can make the difference between a quick fix and a nightmare.

how to make a backup of your database

Here, for most of our clients, who have either our own cPanel-enabled hosting or OneAndOne hosting, is a quick how-to for backing up your database.

If your site is hosted with OneAndOne:

  • Go to www.admin.oneandone.co.uk
  • Once you're logged in and you've selected your account, go to:
  • Websites and Applications > MySql Administration
  • Click on the phpMyAdmin button
  • Click on the database name near the top of the left menu (dbxxxxxxxxx)
  • Click on the Export tab
  • Click on Select All (underneath the scrollable list of tables to be exported)
  • To the right of that, check the boxes for Add DROP TABLE and Add IF NOT EXISTS
  • Check the box for Save as File (on the grey bar further down)
  • Type the date in the File name Template box (after the __DB__ )
  • Click on Go (bottom right)

 

If your hosting is with Masonhost, UK Web Solutions Direct, or with any hosting company that provides the cPanel hosting control panel:

  • Go to cpanel.yourdomain.com (obviously, if your domain is a .co.uk, it would be cpanel.yourdomain.co.uk or whatever)
  • Once you're logged in, scroll down to the Databases box
  • Select phpMyAdmin
  • Click on the database name near the top of the left menu
  • Click on the Export tab
  • Click on Select All (underneath the scrollable list of tables to be exported)
  • To the right of that, check the boxes for Add DROP TABLE and Add IF NOT EXISTS
  • Check the box for Save as File (on the grey bar further down)
  • Type the date in the File name Template box (after the __DB__ )
  • Click on Go (bottom right)

 

Using either of the above methods, you will have downloaded a kind of text file called an SQL file (don't ask). Just store it in a safe place on your computer (and store a copy on your external backup drive, if you have one).

Alternative Backup Procedures

There are other ways to backup your database. If your site runs Joomla, there is a third-party backup extension that will automatically email a backup to you on a regular basis. If you're running osCommerce, you can go to admin > tools > backup and create a database backup with a couple of clicks. It gives you the option to store it on-site or to download it. If you have a Moodle online learning site, it has its own dedicated backup facility (give me a call - quicker than explaining in text).

how to backup of your files and folders

To restore a damaged web site, we need two types of very recent backups:

  • A backup of your database
  • and a backup of your files and folders, also known as a Home Directory backup.

 

Your Home Directory backup is a backup of all of your files. In the case of a Joomla or osCommerce site, these files mostly comprise the (upwards of 1000) pages of php code that dictate the site's functionality and appearance etc. We have invariably done work on that code to customize the appearance and the functionality of your site so your fileset will be quite unique and virtually impossible to replace without a backup. You will also have your own collection of images on your server, images that have been optimized and resized for the web. You certainly wouldn't want to have to ask us to redo all of that work. It is, therefore, imperative to have a recent backup copy of all of your files and folders (your Home Directory) together with a very recent backup of your Database.

OneAndOne, I think, actually charge for their backup facility but if you have cPanel-enabled hosting - Masonhost and UK Web Solutions Direct provide cPanel - log in to http://cpanel.yoursite.com/ and, in the Files section, you'll see both a Backups icon and a Backup Wizard icon. (Don't bother with "Full Backup." It's primarily for moving an entire web site from one cPanel-enabled host to another). You should make a backup of your Home Directory once a month and a backup of your Database once a week or daily, for a busy, ever-changing site. (As always, if you have any questions, please phone or email).

If your hosting is with OneAndOne (and you don't want to pay for the OneAndOne backup-upgrade to your account) you can still download a backup of your files and folders by going to Web Space and Access > Webspace Explorer, selecting all of your files, clicking on the green zip icon to compress them all and then, once you have made the new zip file, click on the blue download icon. Alternatively, you could use an FTP client like Filezilla. FTP means File Transfer Protocol. It's just a way of moving files around the internet. Filezilla is a free programme and it's quite quick and easy to download and set up. Using the Filezilla client, you can easily download your Home Directory - all of your files and folders - to a folder on your own computer. If you want to use Filezilla, please download a copy firstly and then, if you don't find the setup intuitive, just give us a call. We can talk through the setup in a few minutes.

Hopefully, you will never need to use your backups but, should you ever have need of them, they will save the day (and probably save a good deal of expense that's as unnecessary as it's unwanted).

about upgrades

Content Management Systems and e-commerce carts are very different from static-html web sites in that they rely upon a complex file set interacting with a database to generate their web pages. They have sophisticated functionality which is highly receptive and open to user-input via a normal web browser. Using only your standard browser, you can modify or create content, delete files, and initiate or terminate functionality on your site. The down-side to this is that the potential for malicious damage is consequently much higher on a complex, database-driven site than on an old-fashioned static-html site. Both Joomla and osCommerce are continually vigilant for newly-discovered vulnerabilities and are quick to shut the door when one is found but that only helps you if your site is built on the new, revised code. That, as far as most of us are concerned, is what upgrades are all about. Sometimes an upgrade is produced that adds a new feature, or makes some improvement to functionality or useability, but the most important thing about upgrades is that they keep your site's defences up to date.

maintenance contracts

It's also one of the most compelling reasons for taking out a maintenance contract. We charge £150 per year for a basic maintenance contract. That does not mean that we will run your site for you. All it means is that we will a) download regular backups both of your files and your database, b) keep the site up to date with any upgrades or changes to the core code that are announced, c) address any issues that might occur and d) make any changes that we consider necessary to keep things running smoothly. The last thing anyone needs is an extra regular expense (especially one with zero measurable ROI) and we readily understand that some sites simply do not justify the added overhead of £150 per year but you should know that the option is always there - a bit like one well-known politician: prudent but no charisma at all.