Sunday, November 9, 2008

Recover Your Online Websites Quickly with Backups

Frequent backups the necessary "evil" for your online business website


I know, it is something we hate to do in real life with our computers.  I know this because every so often you'll read in a forum something like "my harddrive crashed and I lost everything!".  How often have you read "My website was hacked so I had to start over with an empty site?".

Although we hate backing up our websites as much as our computers, doing so will save you much heartache as well as time.

Backing up HTML only sites


If you have a simple HTML only website then your backup is very simple, just download everything in your webhost's directory and save it to a CD, DVD, USB drive, etc.  In reality, you should already have all the files on your computer which you've been uploading via FTP, so you could just save the off line version.

Backing up dynamic sites that use databases


Backing up a dynamic site, for example one with PHP pages and a MySql database, takes just a little more work.  In this case, you should still save the contents of your webhosting directory (which you should already have a copy of on your computer as a best practice).  You will also need to export the contents of your database.  If you have a MySql database, just go to your webhost's control panel and find PHPmyadmin. It is usually on the main page, but some hosts make it a link inside a "database" page. Once there, it is just a matter of selecting your database from the menu and the the "export" tab.  You'll want to select gzip so it will be compressed and save downloading time. Don't worry, you won't have to uncompress it to later import the backup if the need arises.  If your website uses more than one database then just repeat the process with the other databases.

Reuploading your website after being hacked or server error


If your site gets hacked or files get damaged by routine server tasks, you'll have your back up ready and you'll be running like normal as soon as everything is uploaded back to the server.

Uploading HTML sites


Uploading HTML sites is very easy just upload all the files by FTP back to your webhosting directory. If a page doesn't load, upload it again.

Uploading dynamic sites


First upload the backup of your webhosting directory via FTP.  If your databases were damaged or hacked, go to PHPmyadmin, select a database delete its contents then go to the "import" tab and import your backup. If you get errors, first try uploading your directory backup. Often those are caused from a file being skipped when uploading by FTP.

Don't just upload your backups


Obviously you should do more than just upload files. You should try to figure out what was hacked. It is possible that your database wasn't hacked at all and all you'll need to do is upload your files.

You'll also want to check your web hosting directory for files that don't belong there and delete them before you upload your backup.

Share your thoughts


Have you been hacked? What backup and recovery tips can you share?  Tell us in the forum.

No comments:

Post a Comment