Dapeng Li

Hungry, foolish and passionate – yet another software developer.

Archive for July, 2013

Running CrashPlan on Raspberry Pi

one comment

Background

At home, I backup a large collection of files to CrashPlan, since upload speed is not optimal, I need CrashPlan application to run 24/7.

I used to use a netbook, but it was too noisy sometimes, after I was woke up by the sound of the fan one night, I thought that was enough. My data is on an external hard disk connected to Apple’s AirPort Extreme, it’s accessible in my home network, so changing device to run CrashPlan is not an issue.

I’ve heard of some good words on Raspberry Pi, an inexpensive yet full functional computer, so why not?

Preparation

Get to know Raspeberry Pi

I found PragProg’s Raspberry Pi book to be a very good introduction.

Buy a Pi, and accessories

I bought a Pi and accessories from Taobao (like ebay, in China).

Below is the setup I’m using and had been working well for me for a month now:

  • Raspberry Pi 512MB China edition
  • SanDisk Class 4 8GB SD card
  • Unitek USB cable
  • Power adapter comes with iPad

I had two Kingston Class 4 4GB SD cards corrupted after using for 1 week – both because I had to unplug the power cord from the Pi (more on this at the bottom of this post).

Installation

Image Raspbian to your SD card

Download Raspbian and write an image to your SD card, this article from LifeHacker has some instructions.

Install and Configure CrashPlan on Pi

update over_voltage

Mount the SD card on your computer, edit /boot/config.txt, add this line

over_voltage=2

It might not be necessary, but works for me, got the tip from this post.

booting Pi for the first time

Insert SD to Pi, plug in power cord

  • expand_rootfs
  • change_timezone
  • enable SSH
  • reboot

update

Run this command:

sudo apt-get update

configure SMB (if you are using a shared disk in your network)

Run the following commands:

sudo apt-get install smbclient

Assuming your shared disk will be mounted at /mnt/AirDisk_Data:

sudo mkdir /mnt/AirDisk_Data

Create a file as ~/mount_airdisk.sh with the content of (replace [username], [password] and [IP_Address] with your own):

mount -t cifs -o username=[username],password=[password],rw,filemode=0777,dirmode=0777 //[IP_Address]/Data /mnt/AirDisk_Data

Make the script executable:

sudo chmod +x mount_airdisk.sh

Add the invocation to the shell script to /etc/rc.local so when your Pi boots up the script will be executed.

install Java and CrashPlan

Please follow the instructions on this blog post.

configure CrashPlan headless client

Please follow the instructions on this page.

configure SSH

Here’s a tutorial on setting up SSH on the Pi and your computers, or you can follow the instructions in chapter 6 “Networking with the Pi” from PragProg’s Raspberry Pi book.

Notes

  • Do not pull the power cord, shutdown with command “sudo shutdown -h now“. I’ve got two Kingston SD cards corrupted by pulling the power cord.
  • Backup your Pi: writing image to SD card doesn’t take much time, installing and configuring software does. Although I had never successfully restored image from my backup (might because my SD cards were corrupted), but that would give you some hope.

Hopefully this short post will make your experience with Pi a little better than mine, good luck!

Written by Dapeng

July 14th, 2013 at 10:16 pm

Posted in Using Software