RSS Directory

You’ve heard it over and over again- backup, backup, backup! The importance of backing up your site goes unseen until a problem arises. Instead of barking the need to backup your site to you (because you already know that, right?) I’m going to show you how to backup your SQL database. For the purposes of this tutorial, I’m going to backup my WordPress database.

As I’m sure you know, all of the content within your blog resides in the database- not the files. If you don’t backup your database, you risk losing every  post, page and comment in your entire blog. Your admin interface may differ depending on your webhost, but here’s some screenshots using cPanel:

First, login to your site’s cPanel and click on the “MySQL Databases” icon. Scroll to the bottom of that page and click on the “phpMyAdmin” link.

On the left side of the screen, you will notice a drop down menu. Use that menu to select the database you wish to backup.

Once you select your database, you will notice some tabs towards the top of the screen. Click on “Export”.

Next, on the left side of the screen you can select which tables to export. Click the “Select All” link. Be sure all the tables are selected.

Towards the bottom of that screen, click the “Save as file” box, and name the file something you can easily remember.

Click the “Save” button to save the file to your computer. Congratulations! You have just saved a copy of your database. Keep it in a safe location. If you ever need to restore a backup at a later date, click on the “Import” tab on the same screen you just clicked “Export” and select the database backup file you wish to restore to.

This should be a part of your regular routine. How frequently you decide to backup your database depends on you. The busier your blog is, the more frequent you should backup your database. Don’t wait until it’s too late to set 5 minutes aside for regular website backups!

I know this short tutorial may seem elementary for many of you, but now if you’re blog crashes I can say “I told you so”!


Category: Tutorials
Article posted by: Neon on August 28th, 2007



Trackback URI | Comments RSS

8 Comments to “SQL Database Backup Tutorial” »

Comment by HMTKSteve
Aug 28 2007 at 11:41 am

It’s even easier to automate this with a cron job. I blogged about it in the past and because I am nice enough to blog under a Creative Commons License you can feel free to search my blog for that cron job script and post it here!

BTW: When you have your own server you will find yourself running cron jobs all the time and doing a lot of backing up. Sometimes your web host will offer to restore from their nightly backups (for a price) but when you host yourself you have no one to cry to!

(Comments wont nest below this level)
 
Comment by HMTKSteve
Aug 28 2007 at 11:48 am

Here it is: Cron Backup.

I used that one a lot in the past for clients.

(Comments wont nest below this level)
 
Comment by J. Robinson
Aug 28 2007 at 12:07 pm

I went to your site looking for it but didn’t find it. Thanks for the link. Cron jobs sure make the process easier.

(Comments wont nest below this level)
 
Comment by Jimson Lee
Aug 29 2007 at 12:14 am

In WordPress, simply go to Manage.. Export!

I do this after every post, even though my ISP does “nightly” backups.

(Comments wont nest below this level)
 
Comment by Mikael
Aug 29 2007 at 6:36 am

I’ve installed this plugin: http://www.ilfilosofo.com/blog/wp-db-backup/

It will create a backup every hour, day or week and you can have it sent to a specified email. That way I never have to think about it.

(Comments wont nest below this level)
 
Oct 01 2007 at 7:49 pm

[…] to backup data remotely in case the backup disk in the same server fail… and manually do database backup for very important sites […]

(Comments wont nest below this level)
 
Oct 01 2007 at 8:05 pm

[…] to backup data remotely in case the backup disk in the same server fail… and manually do database backup for very important sites […]

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

© 2017 SiteFever.com c/o Neon.