Installing BackupPC on OpenWRT
I wanted to have a backup server for my church that would automatically take backups when computers came on to our new wireless network. BackupPC immediately sprang to mind, but it only runs on Linux. How could I get a Linux server into the church in a very low cost way? Answer: An Asus wireless router running OpenWRT.
Some notes on getting MultiUserJingle / Mingle working
I’ve been very excited about video conferencing on Linux for the past few days. Currently the gold standard is, in my opinion, the Jingle protocol, which runs over XMPP (aka Jabber). This is the technology that the video conferencing on the Nokia N800 and N810 Internet Tablets is based on. Jingle is a point-to-point protocol, but a new standard that they’re calling Mingle (MultiUserJingle) is looking to make multi-point video conferencing on Linux a reality.
I haven’t gotten it completely working yet, but I wanted to add a few notes for the benefit of weary Intertubers who may be struggling with the same setup as I have.
- First, I have Google Apps, but my domain is hosted on Dreamhost. I needed to add more SRV records then Dreamhost tells you to. I added:
_jabber._tcp.tedcarnahan.com IN SRV 5 0 5269 xmpp-server.l.google.com. _xmpp-server._tcp.tedcarnahan.com IN SRV 5 0 5269 xmpp-server.l.google.com. _xmpp-client._tcp.tedcarnahan.com IN SRV 5 0 5222 talk.l.google.com.
I also added the four priority 20 records that go with each line, but I’m too lazy to write them here. The last line is key – without it, your Jabber client will do a SRV request, get nothing back, and then revert to a blind stab at an A request (in my case) for tedcarnahan.com, which goes you nothing but an unsympathetic webserver at Dreamhost.
- Secondly, my router at home runs the OpenWRT firmware. Did you know that OpenWRT doesn’t serve SRV records by default? To change this, comment out the
filterwin2kline in/etc/dnsmasq.conf.
I don’t have it all working yet, but hopefully this is helpful to someone.
Backing up OpenWRT
I recently got a Linksys WRT54GL router, and I installed OpenWRT, an open-source Linux firmware. But I ran into a sticky problem – how do I back it up? Using scp doesn’t work because scp doesn’t have a way to ignore symlinks. Heavier tools (like rsync) would be great, but they are too heavy for a tiny embedded system like this. This might seem obvious to some, but this way worked quite well:
ssh user@domain.com "tar cv /bin /etc /lib /sbin /tmp /usr /www" > openwrt.tar
Why not gzip the output? Well, remember that the WRT54GL is a tiny embedded system – 16M of RAM and 4M of flash memory. You can’t zip the whole thing up because piping tar to gzip on my router because it would use up all of the available free RAM. By only using the bare minimum (tar) you can successfully get this to run in about 600K of free memory.
Why enumerate all of those folders? OpenWRT routers have /jffs and /rom, among other things, which are overlayed to give you the image you have of the root filesystem. Excluding those (and /dev and /proc) skips a lot of unnecessary file copying.
The resulting file size was 6.5M, and when gzipped it was 2.6M, which agrees quite well with the 2.9M that I expected based on the disk usage in the compressed JFFS filesystem.
I’m planning an extensive “Asterisk on WRT54GL” tutorial soon, so if you’re interested in what you can do with a little bit of Linux and a tiny, in-expensive wireless router, check back with me in a few weeks.


