Downtime? What?

Yesterday, an unfortunate discovery lead to an unfortunate mishap lead which lead to a great discovery and later to another unfortunate mishap. The initial mishap was indeed as terrible as you would have thought, and in some ways it shows how important it is to put proper error checking into your website, and in others it is showing how a user interacting with a website can quickly join the statistic of people who have no ability to use your application and say its too hard. You may be wondering what happened to my site yesterday between 5pm and 10pm, and if you are, be calmed in knowing that it was entirely my fault and I have been working on a few steps to help avoid that in the future. I deleted my database.

There was a recent update to drupal, releasing a new Release Candidate. In a fit of joy I decided that I would update it last night. I got home, kicked off my shoes and pounced onto my keyboard as a cat would on a mouse that had cat nip in a sack around its neck that had been teasing it all day while the cat was clearly unable to take care of that because he had work to do. FF2 updated and I moved over to drupal, grabbed the RC and got myself ready. Unzipped it, looked at its code, and low and behold… they have changed it! Not just insignificant parts, either, they have actually changed a lot of it. Coping with not having all the modules that I had grown to loathe wasn’t a huge issue, but it was clearly going to be a loss. I had more than 30 modules sitting in the background of the site and their new system would clearly not work with them all.

I bit my lip, and copied over the files. SmartFTP ran and ran and mocked me by uploading the larger files, go figure the entire zip of the app is about 300k, in slow succession. I waited, trying to keep my mind on the project that Whitfield and I are coding. Finally after a full five minutes it showed me the magical phrase I was longing to see. TRANSFER COMPLETE. My excitement was more than palpable, it was all over the inside of my boxers, and there was no chance to be able to clean it up… the next step was to refresh the page. Drupal was indeed installed, but… something was off. I was expecting to be able to just copy over the important files and move on with it, I had no clue that I was going to need to edit shit. In my haste to put the application up on my site I failed to remember to ignore a file that contains the connection string, in fact I didn’t even know the file existed.

I was on the wrong road, and I had no way of realizing it until it was too late. I was prompted with a user screen asking for the usual database connection parameters and I was perplexed, but I was instantly on cruise control. I hopped onto CPanel and tried to track down the requested information because I didn’t remember my password for my MySQL user. My host is shared, so I don’t have access to the root or even have the ability to access the users table to be able to reset the password directly, so I had to delete the previous user and add a new one, the process of this action took my cursor through a maze of buttons, which up until last night I never even worried about, but who the fuck puts the button to delete your database a pixel and a half away from the remove user button… Better question, who the fuck puts a delete database button onto a website with no god damn confirmation?

Either way, my mouse passed over the button and my finger depressed that left mouse button and ber-derp, gone. Staring at the screen for the first few seconds in awe wasn’t helping anything. I quickly emailed my host and got in contact with someone in regards to getting that shit back. It took these guys three hours to come back and tell me that they needed a $15.00 charge in order to get that taken care of because it was not an issue on their end… I’m thinking it was, and I’m thinking that It’s pretty screwed up to charge for shit like that, a simple JavaScript popup could be used to avert that kind of disaster, or better yet… no need to JS it. Just a fucking middle form that says “ARE YOU SURE YOU WANT TO DO THIS!?” like every other god damned program ever.

So five hours and fifteen dollars later the database is back, save not having all the shit that I posted or changed in the last 24 hours, because they do their backups at some ungodly hour in the middle of my day… thank you time zones. Either way, I still had another issue. My users were still screwed up, but I fixed that up pretty quickly and got to the base page again, input my information and hit another issue. Apparently my previous idea that there was going to be some issues with my other modules was correct because the next thing that happened was a series of errors and although I tried to remove shit as it occurred it became clear that my work was in vain. I was going to have to delete it all and start again.

Alright, that was fun while it lasted but long story shortened. As you can see I have Drupal 5.0RC1 installed. In fact you may notice that it looks like it has been skinned, properly. Although I liked the previous skin and inexcusable simplicity of the previous design this is something that I have been waiting for and its something that I had done a long while ago in a previous job. Let PHP handle the skinning. Drupal 5 releases a new Color module that allows the admin to tweak the layout to his specifications, and possibly make it so that skinning is now becoming templating and letting color be decided on the fly by the users. I think it looks really nice, and despite all that I lost, including Drupal user accounts, a database, most of the comments, my modules, my previous settings, and $15.00… I have clearly gained a lot more, and so far I do like it.

Leave a Reply