Simple Rsnapshot Setup

Rsnapshot is a perl-based backup script manager. It is a journalised backup system – meaning that it copies all your files across to the backup media once – and then the only data it transfers after that is the changes. The backups appear on disk as complete copies – but where two generations are exactly the same file, they’re actually symlinked to the same data.

Backup Strategies

Rnsapshot has hooks for scripts that run before and after the actual snapshotting. I use the “before” script to:

The after script just unmounts the drive. To add these extra scripts you just uncomment the lines containing the cmd_preexec and cmd_postexec paths and point them to your scripts.

Getting Started

Well I could write a lot about this but to be honest I doubt I’d do better than the excellent rsnapshot howto so I suggest you read that for how to do it. Basically, enter the path you’d like to back up to, the interval you’d like to use, and then a bit further down the page which directories you want backing up (the default is /home, /etc and /usr/local) – then run the command! The howto even includes instructionsn on setting up cron to call the command regularly.

Rsnapshot Conclusion

Rsnapshot was a good tool to stumble upon as a learner sysadmin (which I am) and its very easy to use. I love the fact that it isn’t rocket science, but its a really nice, usable version of a collection of scripts which are duplicated by system administrators the world over. The file structure of the backups is the same as the content that is backed up and retrieving any generation is as simple as copying a file over. I’m sure there are other solutions out there, but I’m a convert and use it on all the local servers I administer (Ubuntu boxes, it works a treat).

Hot House

Well, not hot exactly, but definitely cosy – we’ve got central heating :)

We have had a few people round to quote for it and went with the guy who actually came round when he said he would, and wasn’t the most expensive. Well they turned up at 9am on Monday morning and it was all finished by Wednesday afternoon!

The mess was quite astonishing, I think because we have solid brick walls, so any drilling means brick dust over everything around1. They brought the water pipes up through the house in the hallway, and then along each floor in turn. The boiler went into the smallest bedroom (rather than being in the living room which is where the old one was – strangely) and that room definitely came of worst. There was also a gas fire removed from that room so we’ve got a gaping hole where there was a fireplace about thirty years ago – and the hole contains the guff that has fallen down the uncapped chimney in the intervening period.

The pipes were run under the floors, which means we’ve had every carpet in the place lifted, more or less. Happily the plumber was quite clever about not lifting floors which were difficult, such as the laminate flooring in the living room or the stone tiles in the bathroom. Presumably this is to avoid trouble for him as much as to save our floors. Having had the floors lifted through most of the house, I’m pleased to report that we have got the original floorboards intact and in good condition throughout which is nice. I’m not sure we’d expose them but they are a nice feature if we did decide to (or decide we can’t afford carpets…)

We went for a lovely big boiler which will hopefully cope well with driving two bathrooms and a kitchen, plus any additions that we make over the coming years. Certainly it drives both the heating and the shower effortlessly. Anyone who has stayed with me will know the “trick” to the shower involving running a hot tap (marked cold) while you shower – this is now eliminated :)

All in all it was well worth it – although the mess has to be seen to be believed and I did find it quite upsetting since we had just started to settle in really. Perhaps I’ll post some photos of the places which suffered rather badly – the much-hated living room panelling came off as well and its not pretty!

1 Where “everything” includes matresses, beds, towels, and all the computer kit that was upstairs! I’d have moved stuff out of the way if I’d had any idea which places were best to move them to.

Top top Tips

That is to say, some top tips for the command-line program top. Top is a program to show you the top processes consuming resources on the system. You can then press other keys and the program will respond. For example:

q to quit

z to get a colour output

x to highlight which field the results are sorted by

< and > to change which field it is sorted by

c to tooggle between the program name and the full command that was run

I don’t use every program often enough to just remember the keyboard shortcuts so its nice to keep a virtual crib sheet :)

Garden Digging Party

Last weekend we held a garden-digging party. Mostly because we have been failing to dig the garden in a timely fashion and its the time of year we should be turfing it. Personally I’m not mad about digging gardens but obviously my friends are as there were five of us digging plus one efficient tea-maker and and a 4-week-old mascot.

The weekend started with the garden looking like this:

And by the end of the next day, we had got to here:

There’s another chunk to go and a couple of paving slabs to move but we should be ready to turf quite soon – thanks to everyone who helped, I don’t know how we’d have managed on our own!

Reliably Avoid Subversion Collision – Commit First!

Subversion is a source control system – an excellent accompaniment to software development especially in a team setting. When working with a number of people, it is likely that at one time or another there will be collisions – for example at the moment a project I am working on has a team making some amendments requested by the client for a website. Subversion is handling it all well but the main template files and stylesheets are colliding often as everyone is making changes.

Commit First!

The collision will only occur if you check in a change and someone else has already changed that line in a file. To avoid getting a collision in your working copy, the best thing to do is to commit your change before the other person does.

This approach of commit early, commit often will help you to develop more smoothly without the interruptions of a collision and without struggling with lots and lots of merged files when you’ve left it too long between commits. Additionally you’ll have more checkpoints in your own development history so if you need to go back a few steps, the repository will be able to help you whereas if you didn’t check in, it won’t!

That’s my tip for the day – on a day in a place where many people are bug fixing a single project!

Setting up MySQL to listen to external ports

I had some difficulty setting up mysql to listen to external ports on a server – the development web server uses databases on another box. The important setting was in /etc/mysql/my.cnf where I removed the line:


bind-address = 127.0.0.1

You should then be able to connect a client from another server to this mysql server.

As a warning – bear in mind that it is usually good practice to set up user permissions to only be valid when accessing from localhost if that is the intention – check your mysql table if you can log into the server but then start getting permission problems for other users.

Hope this helps someone!

Ripple Blanket

I have a new niece, as I might have said already. Clearly we knew she was on her way a while ago and so I have been crocheting a blanket for this baby for a while. I chose to make a ripple blanket, crocheted in the round and using this pattern. The wool is Sirdar Snuggly DK and the hook was 3.5mm. I found that the pattern worked perfectly and the resulting blanket lay flat – however the snuggle wool is a bit thinner than normal DK.

Here’s the storyline:

The first photo was uploaded on 10th March, and the blanket was at this point with a final row to go when we got the call to say Natalie had arrived. I forgot to photograph the blanket after putting on the border as we were rushing off to meet her but here it is with its owner:

Tile Transfers

Our house has a cellar, which contains the kitchen. The steps down to it are very sterile white tiles and have been described as being “morgue-like”.

I have been thinking of painting some of the tiles, or even retiling although that seemed rather extreme as we’re likely to change the cellar a lot in a few years time. So I bought some very inexpensive tile transfers from the local hardward store, and applied them immediately allowed them to collect dust until my sister came to stay this weekend and put them on the tiles so now it looks like this:

And here’s a closeup:

It definitely ranks as an all-time best DIY quick-fix, in fact I can’t think of a better one. Suggestions welcome :)

Sunshine Booties

I’ve been a busy bee since meeting Natalie and have finally got round to making these booties as I promised. Here they are:

The pattern was really easy to follow and had photos at every stage which is just as well because it its a very peculiar shape until you get to the end and it becomes obvious how it all goes together! I’ve got the “Fitted Knits” book by the same person and I’m feeling confident about tackling one of the basic (and much bigger) patterns from the book now.

The booties are crochet and use DK wool and a 4mm hook. I did each one in about 3 hours – a nice midweek project :) I’m desperate to do the ones with big curled pointy toes but I’m not sure if they’re too silly … mind you I suppose the baby can’t argue yet!

Twitter, meet Facebook. Facebook, Twitter

Having recently embraced the social networking revolution, or not, I have recently been getting exasperated by how out-of-date my status gets when I can’t be bothered to update it. And how annoying that there are statuses on both Facebook and Twitter which are both out of date.

I stumbled across the instructions at http://www.jeffsandquist.com/HowToPublishYourFacebookStatusToTwitter.aspx and used these so that when I update facebook, the same status appears as a tweet1 on twitter!

If you use both applications then I’d recommend giving this a try. It uses twitterfeed as a go-between to get your RSS feed of statuses out of Facebook and in to Twitter. If you give it a try, let me know how you get on?

1 I am assured that “a tweet” is the singlar label for an entry on twitter. And furthermore that a person posting these entries can be said to be “tweeting”. So now you know!