I think (loud sound of knocking on wood) I’ve solved the Blog problem. The real difficulty was in understanding how the web logging software I use, Greymatter, stored its data. It’s not documented anywhere. And There’s an awful lot of uncommented Perl code to parse. Fortunately there’s a new Greymatter support site, Greylogs, with an active technical forum. I was able to glean enough information from there to be able to fix the problem.
The following will only be of interest to webmasters running Greymatter.
Greymatter stores all entries and comments in numbered CGI files in the archive directory. Those are the only files that matter aside from any uploaded image files which Greymatter also stores in the archives directory. You can literally backup the *.cgi and *.jpg files from the archives directory, blast everything else out, reinstall Greymatter, restore the CGI files, run the Diagnostics and Repair routines, rebuild everything, and all will be well. In other words, Greymatter creates all the other files on the fly from data stored in the *.CGI files.
The problem I had, and I have no idea how it happened, was that entries had been added out of order. Normally the entry names are sequential, starting with 000001.cgi, then 000002.cgi and so on. For some reason some of my last entries were in the earliest spots. I reorganized the entries by cutting and pasting, changing the entry number in the CGI file (it’s the first word), then renaming the file. Once they were all sequential I blew out all the generated files like gm.html and archives.html and rebuilt. It took a while, there was a lot of rebuilding to do, but it all seems to have worked. Everything from the entire year is there and in the proper order.
The upshot of all this is that all it takes to backup the blog is to copy the *.cgi and *.jpg files from the archives directory. Everything else can be recreated. Greymatter should really use a more logical directory structure for this — an entries and images directory, for instance — but now that I understand what’s happening I think (sound, once again, of knocking on wood) I can keep it running for a long time to come. Phew.