Press "Enter" to skip to content

Author: Richy B.

Follow me on Mastodon at @rbairwell@mastodon.org.uk or just the posts on this blog by following @richyb@blog.rac.me.uk .

Snippet: Failure Fall out

*snippet* Despite me pulling practically 36 hours straight at a keyboard due to the failure of the upgrade to our datacentres (I managed to grab a single hours sleep in that time period), I’m still getting a number of technical support queries and fault reports: I spent over 6 hours restoring a server from scratch and all customer data (longest amount of downtime we’ve had ever to my knowledge) and now it appears all the site administrator passwords weren’t backed up correctly. I’m having to reset them all by hand 🙁

Not fun at all. That and “nursing” the server has taken up most of my time recently (the restored datacentre peaked at load averages of over 60 yesterday after another reboot – to reinitalise the SSL system – and I had to watch it for 2 hours to ensure it settled) hence the unfortunately lack of blog entries.

I’m hoping the technical helpdesk will calm down shortly (we’ve got nine open calls at the moment and our “average” is one: I try and ensure it’s cleared on a Friday afternoon by emailing all people with open calls on a Wednesday morning for a “status update”), and I’m be able to resume normal blogging levels.

Now, if only I could find out what in the Ensim Pro upgrade would cause it to totally crash a server during the upgrade process (despite us testing the upgrade extensively before hand) 🙁

Not fun.

Guess That Movie: Scores So Far VI

Another nine images, and another update of the scoreboard and Kymberlie is still in the lead with 2190 points now (so she’s entitled to another prize, but since she’s currently on vacation/holiday she won’t be able to claim it – plus it gives the rest of you a chance to earn some valuable points! LD is still 55 points off the “500 points claim point”, Super Beastmaster is just 120 points behind and “the only other person apart from Kymberlie to win points in the last set of rounds” – Dr G – needs 260 points.

Admittedly, Kymberlie did get a boost of 200 points for round 52: Loser as it had been over 6 days since I had posted it and there were no correct guesses – therefore I had it on “bonus points round” for a day and she just waltzed in and won the extra 200 points. Drat.

Anyway, Good luck and be ready for round 55…

Techy: Single Line Multiple File Search And Replace

Whilst performing the server upgrades, Ensim Pro died and crashed the server forcing us to roll back to plain old Ensim on the Red Hat Linux box. After we had done that, we then had to restore all the customer data and I noticed a slight inconsistency in the data: for some reason, all the backup files had the wrong IP address stored in them! So after the backups were restored, I found the Apache virtual conf folder (/etc/httpd/conf/virtual) and executed the following command at the Linux shell prompt (as root):

/usr/bin/perl -pi -e ‘s/old_IP_address/new_IP_address/g’ *

This practically is a single line multiple file search and replace function and it works as follows:

  • usr/bin/perl start the Perl interpreter (the language this script is written in)
  • -p instruct perl to loop/repeat around the following instructions
  • i edit the specified files in place (i.e. alter the stated files)
  • -e “what follows is a single line command”
  • ‘s/old_IP_address/new_IP_address/g’ a Perl regular expression to subsitute the text old_IP_address with the text new_IP_address on a global basis (if you omit the ‘g’ it will only replace the first occurrence of the old_IP_address found in each file). Change to /gi for a global, case insensitive search if you require
  • * change files matching this wildcard (*=every file and extension: you could use “*.html” just to change files ending in .html if you wanted)

I hope this little script comes in handy to someone else, but I still wish that I hadn’t needed to work out how to do it 🙁

Snippet: Upgrading Server

*snippet* I’m on tenterhooks at the moment: I’m currently upgrading our servers to the latest version of Ensim Pro and Linux and, as per any large server upgrade, I’m scared in case anything goes wrong. Especially since it’s a live system hosting customer data. I’m performing the upgrade on our second datacentre first as that’s only got around 200 sites hosted on it: centres 1+3 have around 400.

Memes: Saturday Scruples

Saturday ScruplesSince the owners of Saturday Scruples were kind enough to give me free 25 shares on Blogshares (I then gave them 25 of mine and brought some more of theirs), I thought I’d do this weeks questions to see how I like it:

You’re on (the) city council. Police want to place surveillance cameras on the downtown streets to deter crime and save money. Do you vote for it?
Yes. Whilst I do respect peoples privacy and tend to sway on the side of “keep private stuff private”, a public street isn’t a private area. Surveillance cameras have been proven to decrease camera by a degree (and no, I don’t have the facts or figures to hand) and so I’ll support a proposal like this.