The Importance of Backups

While we have had previous posts on this same blog about our Premium Backup service here, that’s not really what this post is about. Our backup service is extremely useful as a short-term recovery service, and it’s great for undoing changes to your site files or databases made within the last week.

But what if you want to restore to something older than seven days? This is where it is extremely important to have your own backups. Our staff is actually quite experienced in restoring from almost any source, so if you have your own backup, we can usually restore the content from your copies, and it usually only means submitting a ticket to our support staff.

Our cPanel interface comes with everything you need to actually generate a backup. In most cases, a complete snapshot of your website can be completed by making a copy of your site files, and by saving a mysql export of your database.

To back up the files in your account, you’ll need an FTP client. There are many out there, but our favorites are SmartFTP and FileZilla. Whatever program you use, the login details are the same as your cPanel details. Once you’re connected, It’s usually as simple as copying the public_html directory from the server to your computer.

We offer unlimited storage so if you have a large website, the backup could take quite a while. Depending on the size of your account and the speed of your internet, it could take several hours.

The second half of your backup is just as important as the first: Without your mysql database, your site would just be a shell of itself and you’d have none of the content it’s collected since it was setup. You can generate a backup of your msyql database using the phpmyadmin feature in your cPanel.

A word of warning: phpmyadmin is a fully capable mysql client and some of the things it’s capable of doing could damage your site. In most cases, it’ll ask you to confirm before you do something damaging, and in the cases where major damage could occur with only a click or two, the link to do something like drop a table or database (deleting it) is red, in addition to a confirm dialog, so you will most likely not do anything you didn’t really want to do.

That aside, there are a lot of little things phpmyadmin can do so I’ll tell you what to look for. When you first get into phpmadmin, look down the left side and you’ll see a list of your databases. The first step is to click the database you want to make a backup of. The section on the right will refresh showing you a whole bunch of information about the database you selected and what you can do with it.

From here, look across the top for a tab that says ‘export’, and click it. It will refresh the page again, taking you to the export settings. With the newest versions of phpmyadmin on our servers, you do not need to do anything here except click ‘go’ in the bottom right corner.

Depending on how large your database is, this part could take a couple minutes but eventually you will get a prompt from your browser asking you to save a file. This is your database backup, and it will usually be named with the name of your database and end up in .tar.gz. An example of a filename you’d get would be ‘tempcom_database.tar.gz’ so save it where you can get to it if you need it.

Your database contains all the information that allows your site to change what it displays from day to day, so it makes sense to make a more-frequent backup of the database than your files, but if your site also allows your visitors to upload files, you may want to back up the directory where those files are stored on the same frequency you use to backup your database.

If you have more than one database for your site, repeat these last steps for each database, and you’re done!

In many cases, it’s fine to use our own built-in backup systems, but in the rare event that you want to roll your site back more than a week, it’s important to have your own clean backup of your site. It is never a bad idea to have your own backup!