Raspberry PI cloud backup service with Rsync and SSH

Yes, just what the title says. Here´s how I built a small but yet powerful backup service. Smart, secure, tiny, and low cost. Just the way we want it :)

Raspberry

This nifty little Linux box, not much bigger than a pack of cigarettes, is a really cool little invention (and much healthier than cigarettes). I choose to run Raspbian on it, and these are the basic ingredients i put in there:

  • Perl. You could do a lot with bash or just commands in crontab, but I prefer a home brewed Perl script to make things nicer, control processes, error handling, emailing results, and adding results in a database.
  • Rsync and SSH. These are already in there, but to make automation run problem free and secure, it´s wise to set up keybased SSH authentication in all directions.
  • SMB mount in the /etc/fstab. Yes, this little box holds no information itself. My solution is aimed at backing up a Windows share. Simply mount a share, or attach an USB drive to the Raspberry box.

That´s it. The share is mounted, the Perlscript is in the crontab, and once every night this little box pushes all my data in to the cloud. I know, because I get an email from my script every morning. For various reasons I will not give away the script, but it does only essential things like: Checking availability of the source, checking if previous backup job isn´t finished, managing all kinds of errors, logging to a database, and sending email.

Where´s the cloud?

Since I was only looking for storage, and low cost storage, I was pleased to find Backupsy.com. They do VPS, at low cost, with focus on storage. Still, and for only $10/month, you get a fully featured VPS with the distro of your choice, ready to use in just 20 minute after signing up. I´m happy!

So…a $35 Raspberry PI..and a nice performing VPS for $10 a month. Go ahead and try it!

Backupsy screenshot and topology below.


Leave a Comment