Monday, August 13, 2007

Web Back Up

I really don't know what caused my iWeb data loss when I upgraded to this month's version, but in any case, I'm back up and running from my backups.  I actually had no downtime on my site because when the crash happened, and I lost the ability to publish, the existing site was still untouched.
The symptoms were a loss of images from each of the pages, followed by a warning that I couldn't publish because of improper file types.  I attempted a repair of my Domain file (the database iWeb uses to hold all the pages) by pasting in the images still showing in my web browser.  While that repair was fast, it didn't work, and I suspect there was some kind of database corruption that simple user-level work couldn't repair.
At the time, I was attending Armadillocon in Austin and didn't have the time to work on it, but Sunday night, I reviewed my options and pulled one of my backups.
I have a lot of backups.  I'm a bit paranoid about data loss, so I have several different backup systems running.  I copy my data to .Mac, an external hard drive, my iPod, and DVD's.  I use Apple's Backup, Deja Vu, Retrospect, and Carbon Copy Cloner.  Maybe I have other backup systems running as well that I've forgotten about.  It's possible.
So when I decided to restore from backups, the question wasn't whether everything was backed up, it was which backup copy to use.  Since I hadn't restored much from Apple's Backup lately, I used it, and the backups hiding off on a corner of my TV and Movie hard drive.  I located the last, fat, Domain file and told it to restore.  Relatively quickly, it was back, intact, and just as it had been right before I started playing with the new iWeb.
This time, the site converted and I noticed no missing images.  I settled down to do a page by page inspection, and did find a new problem caused by the conversion to the new version.
On several pages, I had run a perl program to paste in other content.  iWeb published to a local folder.  I ran my patchiWeb program to add in the dynamic content, and then published the results to the real web server location.
But on a couple of pages, the new content appeared in the wrong place.
Close inspection of the html before and after my patch showed what had changed.  This new version of iWeb takes the content of a certain text block and inserts it into the TITLE block of the page. My added code was being plugged into the title, and not where in the body of the page where it should have gone.
A few quick edits fixed that and all was back to where it was supposed to be.
Soon, as iWeb develops, I may not have to patch the pages at all.  I'm looking forward to that time.  

No comments: