Creating a Backup of Your Database Files
This tutorial is specific to Webeze clients who are hosting with HE.net (although if your host offers a PHP My Admin interface, it will work fine for you, too).
In the age of dynamic sites, it's quite possible that most if not all of a site's content (words, pictures, users, passwords, etc.) is now stored in a database. The most common type of database is MySQL and is what is made available to companies hosting with HE.net (Unix/Apache servers).
The downside of this, as opposed to all of your content being stored locally by your web developer, is that should the server have any kind of outage or worse crash, your data could be negatively affected or even lost completely.
But, there's no reason for that and today we're going to empower you to take control of your priceless data by showing you how to do a database export.
First, you're going to open up a browser and type in your website url (www.yourcompany.com) followed by a forward-slash and the words phpmyadmin (www.yourcompany.com/phpmyadmin). This will bring up the login screen as follows:
You will need to know your site's credentials (login name and MySQL password, NOT your SFTP password). If you don't know these (and you really should!), contact HE.net or Webeze.
Once you are logged in, you'll see on the left side of the screen the following:
- information_schema (17)
- database_name (###) -- the number depends on how many tables you have in your database
Hover over your database to select it.
You will be presented with a complete list of all the tables in your database. A maximum of 800 tables are allowed. If you are getting near that number, it's probably time for some database housekeeping!
Across the top of the page you'll see the following:
Click on the Export tab.
By default, ALL of your tables will be selected and we recommend you leave it this way. Also by default are all the settings you need to begin the export of your database for archiving purposes.
Just two steps left and we're done.
At the bottom of the page you'll see the following fields. Be sure your screen matches ours exactly:
If you plan archive these files (rather than just keeping the most recent), you'll want to provide a unique name for the file. The simplest approach would be to add today's date. Thus:
Just hit the GO button to complete the process.
Depending on the size of your database, this could take a few seconds (10-30). Let it run without disturbing the browser and when complete, you will be prompted where to save your newly created back up. Choose a secure location. An external hard drive would be ideal just in case you had a hard drive failure. Really, we're not paranoid!
Be sure to click the "Exit" button (top left) within your PHPMyAdmin to properly close the program.
What about all your design files and static content? We will have your design files, so not to worry there. We should have most if not all of your static content, as well. If you are running any kind of Content Management System that writes to a flat based text file, you will want to be sure that you back that up independent of your MySQL database and save a local copy. It does no good to keep back-ups of your data on the server -- at least as a long term solution.
Rest easy now that you know your important data can safely and easily be saved.
But wait...don't go just yet. Put this important task on your calendar, whether it be weekly or monthly. You'll probably NEVER need it...but who wants to take the risk? Start your back-up schedule today!