Auto-backup a USB drive

No apologies for how infrequently I blog here – if you look carefully online you’ll find I have another blog that is all about my teaching of Computing.

This post is another solution for linux that may be helpful to others. Like many people, my wife uses a USB stick to transfer files she’s been working on to different computers in different classrooms she’s teaching in at school – and to bring them home to work on too. After losing work once too often through disk failure, I decided I needed to get a backup solution that was entirely transparent for her but worked every time.

The obvious thing is to take a copy of the disk each time it’s plugged into the Ubuntu PC at home and then let my Crashplan backup do the rest. Making this automatic was a little more tricky than I expected!

As I know rsync I’ll use that to move files across to a folder in her user area. Easy.

First I tried using udev to trigger it, It took me a while to test this fully, but my final conclusion was that because the script had to complete before the disk was handed off to another service to mount, that was a dead-end for me.

I had written a pretty full script for checking it’s the correct disk and where it’s mounted by this point, so I found in my research something called devmon which is now part of udevil. This allows me to run a script whenever a new disk is mounted – and since my code already checks for the correct disk before running any backup, that’s all good.

I made the devmon command to run on startup for all users, too – creating a startup .desktop through the gui with this command:

devmon --exec-on-drive "/home/jane/Programs/"

This is the script it launches any time any drive is mounted. It will only sync if the right drive is present, using UUID.

#this is the UUID as found by running mount and blkid then looking for the right device
sleep 0
if [ $(blkid | grep -c 8553-6FF8) = 1 ]; then
 mydev="$(blkid -l -o device -t UUID=$usbdisk)"
 echo "Device $mydev available"
#I had an issue with it running before mount was complete. This loop will make sure it's properly mounted before running rsync
 while [[ $(mount | grep -c $mydev) != 1 && $waitTime -lt 5 ]]; do
 sleep 1
 echo $waitTime
 #if the correct device isn't mounted we'll sync, otherwise end
 if [ $(mount | grep -c $mydev) = 1 ]; then
   mnt="$(mount | grep $mydev | cut -d ' ' -f 3)"
   echo "Mounted at _$mnt _"
   rsync -ax --delete $mnt/ /home/jane/usb
   exit 1
 exit 1
echo Backup done, started at $started, finished at `date`
echo Backup done, started at $started, finished at `date`>>/home/jane/Programs/jane-usb.log

Where to begin?

Story bookAs often seems to happen to me, something’s happening in church and I’m off thinking about something else all together. So Doug was introducing his talk on the “ten words” using the same kind of narrative framework that people like Tom Wright have popularised, the kind of six-act drama that begins with creation and the fall and follows through to Jesus’ cross and the church and even the restoration of all things. But there was I thinking to myself (as I often do) that we put far too much emphasis on the book of Genesis and far too little on the rest of the Old Testament, especially when we compare how we use scripture to how (for example) Jesus and Paul are recorded as using it.

Jesus quotes or refers to the OT many times – for example reading from Isaiah in the Synagogue or quoting Deuteronomy when tempted in the wilderness. But how often does he refer to Genesis? Well, once when talking about marriage, any more?

I didn’t know, so I did some research. Using data pulled from blueletterbible.org1 (a site I know nothing of, so this isn’t an endorsement!), I did my stats geek thing2 – and even made some charts. My suspicious are at least partly correct – Genesis is certainly lower on the list of most quoted in the gospels (and the rest of the NT) than Exodus, but both are a long way behind Psalms, Isaiah and even Deuteronomy.

I think we can suggest that Jesus and the early Christians had their favourite passages of scripture, parts that they read (and sang) far more than others, parts that helped them to define what it meant to be a part of God’s people. Exodus and Deuteronomy stand together as Deuteronomy is the “second telling” of the story and the restating of the covenant. However, in terms of quotations, the content of Laws features much more than narrative.

We must not forget, however, the way the festivals of the Torah shaped annual life. It made a framing narrative for life in first century Judea and Galillee as much based on action as quotation. (I heard an interesting discussion that paralleled it with the lectionary which interested me). I think John’s gospel above the others records that context, telling us which feast it was that gave Jesus occasion to visit Jerusalem. Just one example is the most important teaching Jesus gives, at least in John’s gospel. In the context of the passover meal, the celebration of the story of Exodus, Jesus gives his “upper room discourse” and our ongoing central ritual of communion comes directly from that meal.

It seems from my brief studies that in addition to the way sung worship shaped them (Psalms) there are two key defining stories for first century Jews (like Jesus and Paul) – Exodus and Exile – and the two are inextricably linked, especially in the way they interpreted them.

1357972_12388212The Exodus story looks very different to the Genesis based one we tell in church. First up, God hears ‘us’ in our time of need and oppression (the ‘us’ is essential and is made really clear in the passover celebration “we were slaves in Egypt…”). Next, he displays his power over the things that oppress us and frees us decisively. Then he goes on to give the good gift that teaches us how to live freely and in relationship with him despite our continual failure.

I think we should start reading the Old Testament with Exodus as it seems that first century Jews did – reading Genesis as a prequel, an interesting back-story that provides context for the main event, not the headline story in itself. We seem to get hooked up on a bunch of things that in the rest of scripture are relatively peripheral and miss the bigger picture that the are intended to point to.

The Exile story has the same key ideas as the Exodus one but modified subtly. In exile see find that the oppression is our own fault, because of our continual failure as a community, not following God’s instructions on living free. Yet he continues to hear us, to love and teach us, showing his power over and over to bring us back to himself and into more freedom.

Tom Wright writes that it’s important to understand that for first century Jews the exile story was not over, even though many Jews lived in Jerusalem. Jesus comes into a culture full of expectation that the story is about to be finished decisively just like the Exodus one was – and they’re right, just not in the way they expect to be! Jesus does bring about the end of an era but not the expected return of all God’s people to the Holy Land and their domination over all political/military powers. Instead it’s the end of an era of exclusion and suspicion of those not like us, the end of an era of us versus them, the end of an era of building power structures for a coming battle. It’s the end of an era where God’s teaching is seen as rules to feel guilt about and the start of an era where we see God as Love, God as Grace and Freedom.

Now, as we know, that message got confused a bit and the very same things Jesus came to pull down in Judaism are now found in the church, ripe for our deconstruction now. But we can only do this if we start the OT story in the right place, not at the beginning of Genesis but in two places: the start of Exodus and the middle of the exile.

  1. You can see the original data by following the link
  2. You can have a look at the spreadsheet on google docs

McLuhan, Medium and Message

A tweet from Kester Brewin got me thinking about Marshal McLuhan – then I started but didn’t finish this post.

I think McLuhan is countering the assumption that we have that our communications are mere data, sent and received without any noise or corruption. That much is patently false, even without his analysis of media. Misunderstandings are a familiar part of life – I say one thing but you hear something else entirely. Communication is experienced, not simply received. The old chestnut of a tree falling in a forest with no one to hear it starts to have some relevance here; if you attempt to communicate with no audience then what have you done?

What McLuhan adds to this is that the medium of communication shapes the experience of the audience. To say that the message is overwhelmed by the medium is to misunderstand what he is saying though – possibly because we don’t use the words as I think he intends.

The message is not raw data, the platonic form of the communication, but the experienced end result where the intended idea of the communicator and the unconscious modifier of the medium are indistinguishable.

The medium is not a simple one word descriptor of how the message is accessed – TV, blog, phone call, letter – but a complex combination of all the ways that it has been put together. Take a letter for example – one from your bank in foreboding serifs is very different to luxuriant fountain pen cursive. Even TV, the medium we all love yet also love to hate. There are so many media hidden within, subgenres of show where a little tweak in format changes the medium completely. Why is The Voice a totally different should to The X Factor? Not the content or the script – celebrity judges, aspirational contestants with a story and a song, supportive hosts and a prize to aspire to. It’s the medium, the tone, the way the competition is framed and the subtle ways that the contestants are used.

As I sat in church during communion, I was wondering what the message was, what it was I was experiencing. Each church does it differently, each Sunday is a different moment and a different experience. Is it a mystery to be initiated into, a family welcoming you with grace, a reminder of gruesome sacrifice, a warning of judgement, a confirmation of commitment, a show of solidarity or something else? Yes, of course, and far more! The material content and often the actual script is the same but the message varies by the way it is experienced.

The message is both text and subtext; the message is what is experienced – not merely received as if it were a passive thing, or even perceived as if it were dispassionate. We experience it whether we want to or not – and as Kester has also pointed out, sometimes it is only when we move to a new medium that we realise we miss something about the old one. Ebooks and the feel and smell of a ‘real’ book, mp3 or vinyl, 48 fps cinema or 24 – we don’t always know what we’ll miss until it’s not there for us.

McLuhan is right if he’s saying that the message is indistinguishable from the medium as all we have is experience of the two together. I don’t pretend that there is no idea in the mind of the author that is independent of the way it is communicated but I do doubt that it is realistic for us to divide the two – like body and mind, the only certain conclusion of dividing them is that the joy of both will be killed.

On Holocaust Memorial Day

berlin wall fallsFirst of all, I know I’m a day late actually typing this up and publishing, but it’s what I was thinking about and is worth writing.

I don’t really know if anyone realised when planning the series that the passage preached on at Canley Community Church would be so perfect for Holocaust Memorial day – I certainly didn’t and I was part of that planning process. It was Ephesians 2:11-22, Paul writing about the wall of hostility being broken down in Christ.

Doug pointed out that since it seems Paul wrote the letter before AD70, when the literal dividing walls in the temple were broken down, he doesn’t refer to it as a historical fact foreshadowed spiritually in Christ, though now that is how we see it. There was literally a wall to keep Gentiles, foreigners, out of the courtyards reserved for Jewish worship of their God, a wall that no non-Jew could ever cross. In fact, archaeologists back up the story in Acts of a riot occurring because the Jews though Paul had brought a gentile into the temple as they have found signs that literally want gentiles in multiple languages that ‘your death is on your own head’ if they attempt to cross the wall.

But from a Jewish perspective, there was another wall of hostility: the Fortress Antonia which overlooked the  temple, heavily guarded with sentries looking out over the temple courts and a squad ready to intervene if any trouble kicked off.

Walls of hostility are about power: power over God, power over people; control. The Jews had walls to have power over God, the Romans had walls to have power over the Jews – and I believe we do the same.

As we thought about Holocaust Memorial day, I remembered that while 6 million Jews were killed in the Shoah, millions of others were exterminated by the Nazis: Polish, Russian, Romani, homosexuals and disabled people. It seemed appropriate that some of our adults with learning disabilities led us in worship – Canley is a place where many dividing walls have been torn down.

Doug spoke of other literal walls internationally: ones that have been torn down: physically in Berlin and metaphorically in South Africa and the US; ones that have been more recently built like the West Bank. But there are walls in our churches, too – cutting off disabled people is just one.

We sometimes exclude or make ‘special provision’ for young people, keeping their peculiarities and needs separate from the rest of the church, instead of integrating and using them. Multi-racial churches and even national conferences are rare, though they do exist. But the biggest wall that our churches are building right now is to keep ‘the gays’ out.

On Holocaust Memorial day of all days, when reading that there is no barrier any longer, that we are one humanity, that God has ended the enmity, preaching peace to those near and far, is this a message we can hear?

They placed him in a manger…

In a MangerThe nativity story is probably the best known Bible story, so it’s the one that’s most augmented. Pretty much every primary school on the planet is trying to do a different nativity play, a different spin on what we’ve heard every year since we were in the play ourselves. And every year there’s a sermon that suggests a new or different way of looking at the story, too.

This year I’ve been reading Kenneth Bailey’s Jesus through Middle Eastern Eyes (a book I can thoroughly recommend if you want your preconceptions about the cultural context of Jesus and his stories challenged!) His reading and description of the nativity narratives have really made me think about the way our culture has stolen and misunderstood the actual Bible text.

Let’s start with the shepherds. We sometimes dwell on the low status of shepherds in sermons, but this ignores the fact that they were real people who, while thought of as suspicious, lived with other normal people in a normal way for first century Judea. They believed in honour, family and the precious gift of new life.

So the shepherds see Angels and follow their instructions to find the baby in a manger. Never mind how it is they find him so quickly in the town, they find Jesus, then “returned, glorifying and praising God for all the things they had heard and seen, which were just as they had been told.”

The story we’re used to has them leaving a mother who has just endured labour with no female support, a father who has no way to provide for or even find habitable shelter for his family and a newborn exposed in an animal shed. And callous shepherds who just leave them to it and go home!

They could not do that – the honour of their entire community rested on their response to the need of these special guests. Bailey says ” The fact that they walked out, without moving the young family, means that the shepherds felt that they could not offer better hospitality that what had already been extended to them”

Middle Eastern House designWe’ve heard a million times how Jesus was born in a stable, but look in your actual Bible (not the kiddy story book!) The word stable isn’t in there – because normal people (i.e. non-millionaires) in the near east would not have had separate stables, but rather animals shared the single room of the house on a slightly lower floor to the people. Bailey goes into much more detail that I can (p28-31) showing that the normal arrangement was to have a manger in the house, that Jesus had been welcomed into someone’s home. The shepherds found him, found there was nothing more they could do for the family and went to tell everyone, praising God.

But what about the Inn? Mary and Joseph were turned away from everywhere, right? Well perhaps the word translated “inn” really means something else. The gospel writers had a word for hotel or guest house (see the story of the good Samaritan) but used a different one here – one that can better be thought of as “guest room” – an extra bedroom built as an extension to the one-room house either on the same level or on the roof. Someone was already occupying the guest room, so the family welcomed Jesus’ parents into their own home in their hour of greatest need.

So the story of the Incarnation might need reshaping a bit. This is not the story of rejection, of God identifying with all our darkest hours and deepest pains, in poverty and loneliness – we have those stories already in Jesus’ teaching ministry and more importantly, his death.

Immanuel, “God with Us” means utter dependence – the Omnipotent is helpless. Jesus has to depend not only on parents who have been told his significance and importance, but on strangers, a community to whom he has only a tenuous blood-line connection. Bethlehem was Joseph’s ancestral home, but we don’t know how long his part of the family had been gone ‘up north’. Yet here he is, funny northern accent, pregnant wife, faint whiff of scandal and all and he’s taken in. Matthew’s gospel hints that the family stayed for months (until the Magi visit).

We often talk about the gift of Jesus at Christmas, but in this story, it is Jesus who is doing the receiving, unable to return anything, unable to do anything at all. The gift of new life is given, but it needs the nurture and care of a family and the generosity of a whole community to get going.

Christmas PresentThe reciprocal gifts of contemporary Christmas are the opposite of the giving of that first Christmas – self interested and meaningless. The giving of Christmas is pure love, un-returnable gifts, utter dependence on the generosity of others. I can almost hear an echo of the grown-up Jesus as I suggest that maybe we should only give to people who can’t give back to us this year. Sadly, this kind of giving and receiving is perhaps more necessary this year than any other in my lifetime – maybe a real Christmas gift would be to food bank this year.

Also, to end on a high note, when we see that kind of giving, we need to celebrate it, praising God and telling everyone, just like the shepherds did!

“Glory to God in the highest heaven, and on earth, peace to those on whom his favour rests!”

St Paul gatecrashes Remembrance Sunday

poppyIf St Paul arrived in London this morning, he might start his sermon like this:

“I can see that you are a very superstitious nation,
that you worship an ‘unknown warrior’.

He was one among millions
Whose lives were spent defending ‘king and country’,
Spent for a home and an empire that passed away.

Let me tell you about a warrior who did it all differently,
A soldier who is not unknown.
He took his place in a struggle of epic, cosmic proportions.
He volunteered for a mission that could have only one ending.
He found himself alone and dying, deserted by all his comrades.
He went bravely into battle, yet refused to bear arms.
He would not fight back when they hit him.
He would not answer to their taunts.

This warrior conquered by submitting,
brought life by dying,
won victory by accepting complete defeat.
His battle brought lasting peace.

This warrior is worthy of our remembrance
His death gives us the chance to live,
To share in his resurrection life.”

Fixing Faenza theme battery icons for Ubuntu 12.10 Quantal Quetzal

[Edit: There’s been an update to the Faenza theme in the PPA (version 1.3 now) – install it first, log out and back in before seeing if you really need to do this.]

I’ve been using the Faenza theme for years on both my computers, using the ~tiheum ppa to install it automatically. I feel that the subtle squareness suits the unity bar really well. So I upgraded to the latest Ubuntu (12.10, codenamed Quantal Quetzal. I know, I know…) and found a problem. The battery icon was ugly when charging, but fine when not plugged in. Pedant and perfectionist that I am, I had to fix it – and if you have the same problem, make it easy for you to do the same.

The problem is not that the Faenza theme doesn’t have the right icons – it does, but they’re not getting selected because of a change in the way app indicators look for the right icon. They now look first for icons with the sufix “-symbolic” and for some reason don’t find the icons that have always worked for Faenza. So it’s a simple as creating the right sym-links to make it all work.

The script does the same thing for two folders, Faenza and Faenza-Dark, going to the subfolder /status/24 and creating a bunch of links to the icons that are already there so that the indicator-power finds them when the power state changes.

To run the script, in case you’re not sure, download it and open up the Terminal. Make sure you know what folder it’s saved in (for me, it’s Downloads) and type cd Downloads Then type sudo ./ (Thanks to commenter Lithium753 who reminded me to add this in!) That should do it, though you may need to either log out and back in, or change icon themes to something else and back to Faenza to see the difference. Also, try unplugging and re-connecting the power supply before asking for help in the comments. If you do need help, please let me know what output the script gave, copy and paste from the terminal.

Hope it’s helpful to someone! Please leave a comment if you try it, especially if you have a problem or if it doesn’t fix it for you.

Download the script to fix Faenza battery icons

Updating to Ubuntu 12.10

Updating to the next version of Ubuntu is really easy – just type update-manager -d

That is, if you haven’t got a setting that only lets you upgrade to LTS (Long Term Support) releases – which if you’re running Ubuntu 12.04 (Precise Pangolin), you probably do.

Solution: open the Software Centre, then go to Edit… Software Sources. On the Updates tab change “Notify me of a new Ubuntu version” to “For and version” and close it all down. Run update-manager -d and it should be all easy from there!

What I learned from Crashplan on the Raspberry Pi

Swords not includedMaybe you’re bored of the “Crashplan x Raspberry Pi” posting I’ve done lately – sorry and all that, but I hope this might be helpful to someone. The main post has been updated a couple of times, it’s getting a bit messy with edits, so probably if I need to make any more I will have to make a brand new post.

This post is for anyone experimenting with the Raspberry Pi (or another ARM based board) who knows the command line but isn’t big on compiling from source – you can do it, and someone probably has done something similar before! Use your google-fu, try to get an overall understanding of the instructions you find out there, but don’t sweat the detail too much unless it breaks.

So as far as I’m aware, I’m the only one writing instructions on this particular combination of hardware and software, but I know lots of other people have done similar things with the same software and different hardware. Then Raspbian was released, using ‘hard float’ instead of ‘soft float’ to speed up software. Do I know the details of how? Only vaguely – and I know it means a new kernel and potentially new libraries. So I approached my instructions from before with caution, knowing something could go differently.

I first of all did everything exactly the same – just to see. Fail – Crashplan would start and then die. When that happens, look for the logs. I could see that there were two problems, two libraries that wouldn’t load – and So… To the google machine.

A wise man once said that ‘there’s nothing new under the sun‘ and he wasn’t far from the mark. Turns out, most people who use the phrase are interested in Crashplan, which is handy. Also turns out that searching for armhf gives the top hit as someone who compiled both libraries for armhf on the BeagleBone computer, but decided to share instructions rather than compiled libraries. I’m going the opposite direction, but we need all types.

Following those instructions worked out pretty well, though I had to make sure that they reflected the slightly different paths and versions installed on Wheezy rather than Ubuntu. I also had to check that all the right programs for compilation were installed – adding a full JDK did the trick. I surprised myself that it was so easy to recompile the two libraries and put them in the right path for Crashplan.

Compiling isn’t some kind of mystical computer voodoo, it’s designed to be really quite quick and easy, so long as nothing goes wrong. It’s worth looking for someone else who’s done the same thing and seeing how they did it and remember, even if it all goes wrong, the worst that can happen with the Raspberry Pi is that you need to copy the SD image over again!

What’s a Church Website for?

I had an email conversation with a member of our church over an article talking about church websites. The article prompted me to question whether we had ever thought about the purpose of our website and whether it matched what the article was saying.

One purpose that the article seemed to suggest was that it might be an evangelistic tool in itself. I don’t think that’s particularly realistic, having seen the types of conversations that happen ‘evangelistic’ websites. The kind of apologetic arguments deployed seem to be exercises in having better arguments than the New Atheists, with neither side coming out of it as a ‘winner’. As my Mum would say, ‘there’s more heat than light’ produced. If you’re thinking about the website of a local church (as opposed to a national or international church like the Church of England or the Baptist Union), you’re unlikely to be able to generate an active forum of discussion anyway, and I think that there are places for that kind of discussion already out there on the internet. If you’re called to that kind of evangelism or apologetics, join and support somewhere that is already doing it.

More realistically, the internet makes it possible for a small church (the article mentions Luss Parish Church) to serve the global church, for example with sermons and study notes that can be downloaded and used in other congregations, small groups or in personal study. This is realistic, though a ministry of the scale of Luss takes time and a real calling to develop. Almost any church with just a small amount of training and equipment can record sermons of a quality suitable for uploading online (as we do at Canley), and I’m of the opinion that sharing resources like bible study notes is always a good thing. The bigger challenge is getting people to find what is being offered. With the millions of congregations worldwide, how will yours stand out? Being regularly updated with quality content helps, but getting links will make the biggest impact. Links (as any really helpful SEO consultant can explain) should come from someone who likes what you’ve shared so much they want other people to see it. The first step on this is having a site that people in your church want to share!

But probably the main purpose of a church website is as a ministry for the local church and community. Unless you have a very specific calling to do something else, I think that this should be your primary focus. This purpose splits into two parts – church members and interested non-members who live locally. They will be looking for different things on the site, the challenge is to meet both sets of needs. Church members will want to check the times and locations of activities and listen to sermons or download study notes that they have missed for one reason or another. Making it easy to find these things in the fewest number of clicks is important, and making it easy to share good content with ‘social buttons’ will help them to pass it on.

The majority of local non-church members who come to your website will have had contact with either your human presence or your physical presence. The human presence is the people that make up your church – a conversation with a neighbour, a visitor to a school assembly, contact at a special event. There’s less pressure looking on a website to find out about what the church is like and the times of activities than asking someone who will then have expectations of attendance. The physical presence is the building and notice boards that for some churches are so important. People know the building, the steeple, the road and perhaps they wonder what’s happening, what the church is like. A smaller number will only find your site through your virtual presence – links and search engine placings. This could be because they have moved to the area and are searching for a church, or looking for an Alpha course, but rarely will it be an accidental stumble.

Non-members will be looking to get a flavour of what the church is like, so a few links to content might interest them, but they will want more emotional connection, too. This will be generated partly by design and by photos and video on the site. Good quality design takes either a bit of time or some money – though not necessarily a lot. If you use a CMS or blog software (I use WordPress for example), get a good theme and customise it carefully, or pay someone to. There are people who specialise in church websites and charge reasonable fees, so look one of them out. If a picture is worth a thousand words, imagine what a short video might be worth! Every single one of your photos need to be good quality, even more so for videos. Amateurish quality will say something about the church, especially to media savvy younger adults. Connection will also be developed by the way information about (for example) leadership and beliefs are presented. Things like statements of faith and lists of leaders in the church are things you rarely look at, so interested people won’t necessarily know what it is they are looking for, though it will often be something that is similar to their current church. An effective information page will generate or demonstrate empathy, welcome and include visitors.

Non-members will be comparing your site with others, looking for information about activities, times and perhaps thinking about making contact online. Making all these things available easily is important – perhaps having a ‘new to the church’ page with images, video, written introduction and links to these things would be helpful.

Thinking this through has made me think about changing and updating the church site I manage, I hope it will help others too. I’d love to hear your comments, too. What do you think the purposes of your church website are? What really good church websites do you know of? What do they do particularly well?  I haven’t touched on Social Media like Facebook and Twitter in this post, either – what do they add to the online presence of a church?