12

I'd like to have a computer at home that I rsync my files to from anywhere, preferably at any time I choose. The daily volume of data will rarely exceed 100M. It needs to be cheap and easy to replace, not fast (it's for backup/archiving purposes only).

One idea is to use a Raspberry Pi with a USB hard disk. (Or two.) Would you? Can you list any drawbacks that make alternatives obviously superior?

1
  • 5
    Absolutely, but be aware you will probably need a powered USB hub for the drives (if they are not self-powered), as the pi ports only deliver 140 mA.
    – goldilocks
    Feb 28, 2013 at 15:58

3 Answers 3

8

I also think this is a good setup. I currently do run a Raspberry Pi, connected directly with a 3.5'' USB 2.0 hard disk (Western Digital, 1.5 TB) with external power, and it works like a charm: I get hourly backups when I'm home, and the Raspberry is also an excellent file/media server.

I get 23MB/s instead of 30MB/s on the hard disk, but that's still quite good. I can stream movies off the hard disk (through Samba or MiniDLNA) without problems.

In fact, the hourly backups are done from my laptop using Apple Time Machine, but using rsync shouldn't change much.

As @goldilocks mentioned, hard disks without external power (like most 2.5'' hard disk) will require a powered hub: my Raspberry shuts down as soon as I try attaching one directly (edit: that was with a 5V-1.2A power supply, but still happens when attaching directly with a 5V-2A power supply; a powered hub solves the problem).

In addition, I've installed BarracudaDrive (http://barracudadrive.com/), available for free from the PiStore, which I'll use as my personal cloud in the future.

Hard disk reliability

The USB HD powers down when not used, but this is implemented by the HD enclosure (most recent ones I bought have this).

Note that spinning down and up is a stress in itself for the hard disk if done too often, but since you can't set the spindown timeout, this is only a problem if the producer chose the wrong setup.

(Google for "ubuntu destroys hard disk" to find discussions such as: https://ata.wiki.kernel.org/index.php/Known_issues#Drives_which_perform_frequent_head_unloads_under_Linux).

Anyway, you should simply use a reliable USB hard disk designed for your kind of scenarios. Or two ones in mirroring (edit: but I would check performance first, since mirroring would double the required USB bandwidth for the same amount of writes).

Instead of mirroring, I carry a rugged hard disk always with me and do backups also there.

General software setup tips

Of course, you should pay attention to the filesystem you use on the HD: nowadays ext4 is probably the safest choice since it's easiest to recover it.

You might want to use rdiff-backup instead of rsync, to have access to historic backups.

Finally, since you'll probably do rsync over SSH, you might want to select the RC4 cipher for extra speed (edit: but see the warnings about security in this other answer if you do that over the Internet). Here's an excerpt from my .ssh/config on my host:

Host pibbw # Replace pibbw with the hostname of your Raspberry Pi
        User pi
        Ciphers arcfour128
2
  • How do you measure the hard disk speed? I'm getting less than 2.5 MB/s on Samba transfers from the hard disk.
    – palswim
    Oct 2, 2014 at 6:34
  • IIRC, 23 and 30 MB/s come from hdparm. But I have to retract my statement about streaming... (More from a non-mobile device). Oct 4, 2014 at 5:36
6

I've boxed one of my Raspberry with a micro USB hub and a 500GB HD to backup critical directories of my 2TB NAS via rsync. (Just the ones that I cannot afford to lose).

Both the Rpi and the hub are powered by a 5V-2A power adapter (7€). Everything works very well.

I'm so satisfied that I've bought a 2 slots USB HD dock like the one here. One of these days I'll buy a couple of large HD and will move everything there.

BTW, I also plan to install OwnCloud and make it accessible from Internet so to have my own personal Dropbox-like system.

5
  • 2
    Does the HD power down when not in use? It will reduce power consumption and wear and tear to a fraction, but I'm not sure how to make sure that it will - will the Raspberry Pi need to support it in some way? Feb 28, 2013 at 19:16
  • I'm not 100% sure but I would say yes.
    – Remo.D
    Feb 28, 2013 at 19:54
  • Do you actually mean a 500MB HD? Mar 2, 2013 at 0:20
  • Most of my modern HD enclosures power down when not used, independently of the system they're connected to. Mar 2, 2013 at 0:38
  • @Blaisorblade, ops! Of course, I meant GB :)
    – Remo.D
    Mar 2, 2013 at 6:13
1

I am already using the Raspberry Pi to back up my html directory and mysql tables. Details are available in my blog!

http://ahmet.tekelioglu.org/en/raspberry-pi-backup-and-disaster-recovery-tool

I am making an incremental backup of my Apache server's HTML directories over a cable modem connection at home. The MySQL databases are backed up whole because incremental backup is neither possible nor necessary (tables were small enough). I could have used ADSL just as well.

MySQL dumps located on the server have to be prepared in advance so that when the Rasp-Pi starts syncing, they are present. An external USB drive and a WiFi device are attached. It is possible to replace these with a thumb drive and a GSM modem. The monitor and the keyboard were removed after setup.

2
  • Hello, and welcome to the RasPi StackExchange. Link only answers are against site policy. Would you mind expanding on the answer, at least giving a summary of what needs to be done?
    – Jacobm001
    Jun 4, 2015 at 15:56
  • I have edited my original post. What do you think of it?
    – dos360
    Jun 6, 2015 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.