The blog portion of my website is wordpress, the remainder (that the public can’t see) is php built with Zend framework. The whole thing sits upon a linux box, running fedora, which is in a facility on the other side of the nation from me. The server was 4 releases behind, hadn’t been upgraded in 2 years, and hadn’t even been rebooted in 288 days. I was hosting not only my own website, but 8-10 others for other people – friends and acquaintances who for whatever reason don’t have or can’t afford a hosting service. Obviously things were going entirely too well.
So, a few days ago I decided to upgrade to a new release of Fedora (or, put another way, I decided to shoot myself in the foot).
I have to rely on the folks who operate the facility (Superb) to do the upgrade, and whether because of poor instructions on my part or poor execution on their part, things became quite difficult. After about 3 days of arduous struggles, I have pretty much got everything back up.
The biggest issue was that two of the websites, one of them this one, could not be completely recovered. Because I made a bad mistake.
I am scrupulous about backups. I have backups everywhere. But because of doing so much backup, I don’t backup whole disks. I don’t backup static stuff. I don’t backup code. And I regard websites as code. All the code for websites I build is in a subversion repository. If I need to reinstall a website, I just check it out of the repository.
Then I started using WordPress. And I have carefully backed up its database, along with all my other databases. However WordPress commits what I consider to be a sin, and it bit me. WordPress stores most of its images not in its database, but in its wp-content directory. It also stores other things – themes and plugins – in that directory. wp-content is just a directory in the documentroot – nothing special about it. But it doesn’t get backed up when I backup the wordpress database. Duh. This is my own fault. I knew this. I had even made the mistake once before of thinking that I could simply reload the database from the repository. But this time I did it not only to myself, but to a fine organization for whom I had built a website — and they had uploaded many, many pictures to their shiny new site. Now all those pictures are gone. My fault.