Using the Raspberry Pi as a backup server

Lead Image © Oleksandr Lupol,

Safe is Safe

A good backup system is not only important, it is essential when a hard drive crashes, a virus infects the system, or you are victimized by ransomware. Luckily, the Raspberry Pi is ideally suited to run as a backup server in the background.

Many PC users are knowledgable about IT. Consequently, they automatically take on the role of IT administrator for their family. However, administrative tasks can be time consuming when a hardware defect or virus attack is involved. An additional frustration, which is often part of a family setting, is that recommendations to perform regular backups go unheeded.

Fortunately, you can build a small and economical backup machine using the Raspberry Pi and an external hard drive. This machine can then assume its duties without further maintenance. If you are a straightforward Windows user who does not have a large media collection, this article is targeted to you. Regular backups should run in the background without restricting the user. In the event that problems occur, it should be possible for the administrator to correct them without much effort.

Copy versus Backup

The easiest way to secure data is to copy it onto an external storage device. While this is better than doing nothing at all, copying means that you have to perform some manual operations and potentially also risk overwriting previously secured data. The potential for overwriting gives rise to special problems when a virus or an encrypted Trojan has attacked the files that then get transferred to the external storage device. This excludes use of cloud storage like Dropbox or backup programs like Duplicati [1].

When searching for some simple software to run genuine backups, I encountered the client/server application UrBackup [2]. Running under both Windows and Linux, this service secures files on a server either entirely or incrementally. It works without a network drive, making it secure against viruses and Trojans.

The open source software supports diverse use scenarios by virtue of the large variety of options it offers. However, the Windows user remains oblivious to the many options. The administrator can also ignore configuration files. A convenient and functional web interface, albeit one that is not very pretty, makes it possible to configure the system quickly and perform administrative tasks, should these ever become necessary down the road.

Check It Out

Before describing the installation process, it makes sense to clarify hardware issues. Since the appearance of the first-generation Raspberry Pi (Rasp Pi), the single-board computer's reputation has been that it is unsuitable for data-intensive applications. The LAN adapter only supports 100Mbps Ethernet and depends on the USB interface. The Rasp Pi does not have a SATA connection, thus limiting the connection possibilities for external hard drives to USB 2.0, which in turn seriously restricts the write rate for the drive. Additionally, the network connection reduces the rate even further.

These features detract from the idea of using a Rasp Pi as a backup server. However, most households with non-IT-knowledgeable members use WiFi to connect computers to the Internet. Frequently, the connection has an overall data throughput rate of 54Mbps, meaning 20 to 25Mbps are usually left over. Therefore, if the Rasp Pi is connected via a network cable to the type of routers found in most households, then the throughput rate suffices for the use of some backup WiFi clients as well.

Consequently, the Rasp Pi is well suited for use as a backup server by the target user group. In the scenario presented here, a Raspberry Pi 3 (RPi3) works together with a PiDrive hard drive from Western Digital. This hard drive comes with 314GB capacity for $32 (~EUR35) [3] and 1TB capacity [4] for $80 (EUR75). In spite of their USB 3.0 connections, the PiDrives consume minimal power (Figure 1).

Figure 1: This PiDrive hard drive from Western Digital has a capacity of 314GB. A 1TB version is also available for purchase.

As an accessory for the hard drive, Western Digital offers a case that can also accommodate the Rasp Pi for $10 (EUR11) [5]. Western Digital also has a special connector cable, but the commercially available USB 3.0 strip suffices. The company includes a special cable with the purchase of its 1TB PiDrive. The "Hardware Alternatives" box provides information about additional options for the backup server.

Hardware Alternatives

In addition to the setup described in this article, it is also possible to use a standard 2.5-inch hard drive for bulk storage that be connected to the Rasp Pi with an SATA USB adapter. Because of the difference in power consumption, it is possible that this works in individual cases; however, this is not a guarantee. The only thing to do is to try it out.

When using a Banana Pi, you should connect a SATA hard drive directly to the board. Depending on the power supply and the hard drive, problems have occurred with this approach in the past. The Banana Pi does not offer any advantages in terms of price. From a lack of support, the device is not suitable for secondary use as a media player.

The Intel NUC [6] and related devices like ZOTAC are more powerful alternatives. Even the smallest NUC versions are well designed. However, they are also about twice as expensive as a Rasp Pi plus its power supply and cover. On the other hand, the Intel devices have an elegant case and, more significantly, a genuine Gigabit LAN connector plus adequate I/O performance. This is ideal for those with larger backup needs.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content