Heal Your Church WebSite


Teaching, rebuking, correcting & training in righteous web design.

Restoration Notes

Understand this. If you do not have a contingency plan, then you are already planning to fail. You can quote me on that.

One of the other sites affected by my former host’s failure was Homesteading Today. A site full of gentlemen farmers and work-from-home-school-moms. No, I’m not either one, but my good friend Chuck is.

He is running a piece of software known as phpBB. It is a bulletin board application that uses the MySQL database to store and retrieve hundreds of messages on demand.

When our web host called it quits …

… he took with him several weeks of data. Yesterday morning, when Chuck and I finally got our hands on the backups, we discovered that our host provider was not story the MySQL data in a format that is easily restored.

In fact, he created binary images of each table, that would require root access to restore. Not only that, but the files are HUGE. Fortunately, I had an easy-to-load ASCII dump I took about a week ago using the following syntax:

mysqldump -u -p DATABASENAME –opt > 14may02.sql

Obviously, you fill in the all uppercase words with the necessary names and authentication.

The problem is, even though we restored the system as it was on May 14, we now have a “hole” in the data ranging from May 15 to May 27. As I said, all I have are binaries that require root access, which my current/new host provider … or any host provider for that matter … would dare give me.

If I could just get at the databases for a minute … I could dump the missing data and fill in the gaps. To do this means implementing on the following restoration plan:

  • install MySQL on a Win NT/2k/XP platform
  • do a structure dump of the database here (ascii)
  • ftp the structure dump to the PC
  • create a database, load the structure dump
  • tar -zxvf the binary datasets
  • copy table files to the newly created database’s directory and hope we can fool mySQL
  • if we fool the database, we delete records not within the ‘missing’ date range
  • we then mysqldump –opt (ascii) the data within the missing date range
  • create a mirror image of the bbs system here
  • load the “missing data” into the test/mirror system and see what happens
  • if everything is kosher, switch the database pointer for the production system to point at the newly created/updated database
  • pray

Now most of this is off the top of my head. Why? Because I do this stuff all the time. However, since many of you don’t, you need to sit down and spend some time thinking about how you would restore a crashed system … and with what?

The mistake Chuck and I made was not making regular backups of the regulare data dumps. More on that vERY soon.

Comments are closed.