Simple MySQL Backup

If, like me, you have a database full of small tables, but all amounting to a large amount of data then dumping the data from it into a single file is handy, but not very useful when it comes to retrieving a backup of one single table.
Instead, wouldn’t it be easier to dump each individual table into it’s own file? What about keeping a week’s worth of backups? Here’s one way I backup my WordPress db with a little Bash script:

export d=`date +%u`
mkdir -p backup/$d
for i in `echo "show tables" | mysql -u username -ppassword database|grep -v Tables_in_`;
do
  echo $i; mysqldump --add-drop-table --allow-keywords -q -a -c -u username -ppassword database $i > backup/$d/$i.sql
  rm -f backup/$d/$i.sql.gz
  gzip backup/$d/$i.sql
done

Behaviour : Using CSS selectors to apply Javascript behaviours

Lurvely! This is a very neat method for removing Javascript from html pages! Embed it in the CSS! (sort of!)
He has a couple of examples on his page, and it looks easy enough in principle. The devil’s in the details don’t you know but it looks like it’s worth trying!
He’s a busy beaver too.. he has an MVC framework and tutorial that steps you through an example.

Naval Ships in Cork Harbour

Today myself, Ryan and AJ went down to see the various naval vessels docked in Cork Harbour.
Ryan has already posted some great photos and here’s some of mine here. The URL will change but I’ll update this post when it does!
I had a great time, the Germans got a great kick out of seeing a crazy photographer lying down on the quay taking snapshots of a coiled rope, but they did pose for a photo afterwards! It’s a pity my camera crashed minutes later and several of my shots were ruined 🙁

Sit-in at city shop

I went into town this morning and came across this group of protestors on Princes Street. I didn’t know it at the time, but they were employees of O’Donovans Butchers, a 105 year old company with a premises on the street. They had all been let go the previous day. The Evening Echo has more on their front page.
The workers were protesting because they were laid off almost a week early with very little compensation despite many years of service in some cases.

Evening Echo