Backing Up Your Website Part III

Uh-oh! Disaster strikes and your website got blasted and now you have to bring it back. No fear, you have your backup sets handy, but do you know how to restore from those backups?

It is very simple.Create a directory (folder) on your computer and then copy the latest backup set into that folder. Unzip the files. Now, fire up your FTP client and connect to your website account and I would suggest deleting the existing files and recreating the public_html directory. Then transfer the files you just unzipped from your computer to your webhost’s public_html directory. Most GUI FTP clients can transfer whole directory structures by selecting and transferring the top level directory. Once that is done, then you need to log onto your webhost’s cpanel and go to MySQLAdminPHP and then load the backup SQL file.

Maybe you have to use the command line mysql utility. For example: mysql -u userid -p 'password' -D DATABASE_NAME -h HOST_NAME < /path/to/your/local/backup/folder/backup_YYYYMMDD.sql. Most web-hosts though require some setup on the CPanel in order to do this, plus you need to have MySQL installed on your computer to do this.

Yeah, it is pretty much that simple. Of course, fire up your web browser and make sure you can load the website.

Five? WOW, as I note in Part I, it happened to myself once and then another incident was my web-host had an incident and some of my sites came back but not all. When I asked they just shrugged their shoulders as to what happened (as to why not all of my sites were not restored) and pointed out it was my responsibility to keep backups of my sites.

I do not have a lot of exp with security on all of this, but the one thing I do, do is to immediately create another admin account and disable the “admin” user account. Another practice is to never put off the upgrade of WP. It is easy enough to do, and this is probably going to spur another series of posts on the importance of creating a separate test system, something I hint at in this series.