My Favorite Backup Device: Raspberry Pi NAS

Last year, I got one of those little Raspberry PI (R-Pi) devices. It’s pretty cool, but in the end it’s a little PC. Since there’s a big bad PC under the desk, the R-Pi didn’t get much use. Also, I’m a chicken hardware hacker and so I never put anything onto the GPIO pins.

Tutorial about the GPIO pins: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/overview

Everyone was setting up NASs, and that seemed lame to me… until my second computer, which is this old Celeron, that gets used as a NAS/Freenet/Bittorrent/Backup box started to heat up my home a little too much. The first three functions, I don’t care much about, but that last one, backup, has gotten more important over time.

It’s never not been important, but lately, having it automated has meant a lot more to me, and the data’s backed up twice a day.

The NAS recipe is easy:

1 R-Pi
1 power cord and adapter
1 powered full-size external hard disk

Set up the Pi as normal, then fix the networking. Edit /etc/networking/interfaces to give the Pi a fixed address. Optionally, create a new user and add it to /etc/sudoers so you can log in as someone besides root; set the root password.

Connect to the LAN and see if you can ssh in remotely. If so, great. Remove the lightdm package; it’s the login screen. When you don’t run X, you can run the computer on 55 Megs of RAM.

Connect the hard disk. It should show up at /dev/sda1 if it’s already formatted.

Make an entry in the /etc/fstab file. I created the directory /mnt/sda1 and then mounted /dev/sda1 at that folder, and created the corresponding fstab line:

/dev/sda1 /mnt/sda1 ext4 defaults,noatime 0 1

Mess with /etc/samba/smb.conf if you want Samba. I didn’t. Consider running an rsync server if you need to push changes.

Ahh, usb2 sucks

Lately, I’ve been making little TrueCrypt volumes to store my sensitive data. It (was) awesome — the website says it’s not secure now. However, these volumes are multi-gigabyte, and this isn’t going to work with this USB2 based device. It takes around a minute to transfer 2 GB of data over USB2, before factoring in disk slowness.

Fortunately, most sensitive data is fairly small. (If they aren’t compromising videos.) Things like tax forms and even PDFs are still measured in kilobytes.

Since TC is now defunct, we’ll have to find something else, eventually. Man, what a drag. I liked TC because it was crossplatform.

Some folks are resurrecting it: https://www.grc.com/misc/truecrypt/truecrypt.htm