Skip to content

Backing Up Your Web Site

Backups are often underutilized by beginning webmasters. Once you have your web site up and running, the next step is to schedule backups on your data. You should create a backup schedule based on the frequency you update your web site. If you only update your site once a month, it seems counter-productive to have hourly backups. Although if you update your site every day, having daily backups make sense. One motto to live by is "When in doubt, backup!". Having extra backups, while maybe not space efficient, will give you piece of mind if some travesty were to happen to your site.

Backups can be handled a few ways:

  • Automatic Backups
  • Manual Backups
  • Full vs Incremental Backups

Why Backup Your Data

There are a plethora of reasons for making backups:

  • Web hosting company closes shop.
  • Server gets infected by a virus.
  • Server's hard drive(s) fail or get damaged.

All of these events could cause a loss of data and this loss could affect your web sites traffic or earning potential, nevermind all that hard work you put into it. The more places you have your backup's the better. Store a copy on your web hosting server, another on your home computer and another on a flash drive or external hard drive. Doing this will ensure your data will be safe and no matter what happens to the web server, home computer or external drive, you will have options available to bring your site back online with as little downtime as possible. The best part of this, is with a little effort in the beginning, you can automate this whole process so you don't have to do it yourself. You have the computer do it for you!

Database Backups

If you are using a content management system (CMS) such as: Wordpress, Joomla! or Drupal, backing up those files is not enough. Most of your actual data is stored in a database (MySQL, PostgresSQL, etc...). Not only do you have to backup the directory where your files are stored, you will also need to make a copy of the database that holds your CMS's data.

When To Backup Your Data?

Timing is everything, or so most people say. You should schedule your backups during your sites off-peak hours. If you are using a database to store your data, the database may require you to lock tables in order to effectively backup your data.

If most of your traffic is from the United States, you should schedule your backups in the middle of the night (03:00 EST). This way your web server can serve your web pages during peak hours without having to process your backup script.

Automatic Backups

Automatic backups can be provided by your web hosting company or you can create a backup script to automate the job yourself. Backups that the web hosting company, while useful, should not be the only set of backups you have. What if their backup servers get damaged or infected with a virus? Backups created by a web host should be treated as an "auxiliary backup".

If your web hosting company does not provide scheduled backups, the easiest way to start is to create a script to automate the process. A sort of "set it and forget it" mentality (Just don't forget about it). If you don't know how to create a script, you can ask on a forum or you can pay someone to create it.

Manual Backups

Manual backups are backups where you connect to your server and do the backups yourself, without relying on a script of the hosting company to create the backup files. This is by far the easiest method for new webmasters, but it requires you to do it "in real time", meaning not utilizing a time saving backup script to run on a schedule.

Full vs Incremental Backups

Why backup files that haven't been changed since your last backup? Using a program called rsync, you can update only the files that have been changed since your last backup. This method has the benefit of saving bandwidth and quicker backups.

Full backups make backups of your files regardless of how often you change them, it's the same as just copying or archiving a directory. Every backup will contain the same files, including files that have not been changed since the last backup.

Testing Your Backups

What good are your backups if they contain faulty or corrupted data? Every once in a while, depending on the frequency of your backups, you should test them to make sure they are working correctly. You can set up a development server on your home computer and set up your backups there or you can set up a "dummy" site to test them on your hosting companies server (via a subdomain or unused domain). If you update your site frequently and make backups on a daily basis, testing your backups once a week seems reasonable.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <p><b><i><pre><a><img><em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><h1><h2><h3><h4><h5><h6>
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options