Raspberry Pi 4 backup appliance

Rapsberry PI 4 is (finally) relatively powerful hardware and suited to host a UrBackup appliance. Specifically:

  • 4 GB RAM
  • 64 bit support
  • USB 3
  • Gigabit ethernet
  • Build-in Wifi

The RAM is of course not ECC-RAM which makes it unsuited for large UrBackup appliance instances or serious use (you could always risk it, see notes on ECC RAM section on the bottom).

The main advantages of Raspberry Pis are that they are widely available, have good support and merely by having so many people focused on them, having few bugs.

A few gotchas when setting up a UrBackup server:

  • Use the SD card as a read-only device for booting the operating system. Regularly writing to the SD card will break it because SD cards are not designed for such use. There are “industrial” SD cards designed for regular (random) writes (e.g. SwissBit) but they cost way too much (an external USB SSD is cheaper)
  • I had a lot of problems getting the 64bit Linux kernel to boot, but I guess this will improve
  • Power supply is still an issue. The USB SSD drive I was using caused issues because (I think) the power supplied by the Raspberry wasn’t enough. I’d guess the Raspberry + USB SDD need a 4A power supply at least.

The system plus costs (w.o. taxes):

Raspberry PI 4 Model B 4GB50 €
Intenso SSD 256GB37 €
32GB microSD SDHC3 €
Raspberry Pi 4 Case6 €
Powered USB 3 hub 5V/4A (20W)20 €
USB 3 to USB C cable7 €
Sum (w.o. taxes)123 €

Once you have the base system, you can add USB disks as backup storage, use those 2-bay docking stations + disks or use larger 4-bay USB external disk enclosures. Adding single USB disks is probably cheapest.
Alternatively, if using the Infscape UrBackup Appliance, you can store your backups directly to the cloud (Amazon S3 or compatible) using the SSD as local cache.

Software

I’ll describe how to setup the Infscape UrBackup Appliance. You can of course also install Raspbian and install UrBackup on that.

Download the image for the SD card.

Write the image to the SD card using e.g. Win32 Disk Imager.

For setup, you’ll have to attach the Raspberry PI to your wired ethernet network. After setup, you can run it via Wifi only. Put the SD card into the Raspberry and start it up. After boot it’ll show its IP address on its display. Alternatively, you can look for new devices on your router, or using an IP range scanning tool.

Browse to http://YOURRASPBERRYIP and follow the setup wizard.

Make sure the SSD is attached and click on “+Use device” on the status screen. Then use the SSD as external system disk (UrBackup database, logs and temporary files will be stored on the SSD instead of the SD card).

If you want to store the backups to S3, select that you want to use the system disk as cache (or attach an additional SSD as cache only disk). If you want to store the backups to a local (USB) disks I’d recommend to also use the system disk as cache for the local USB disks (cached, auto-layout RAID).

ECC-RAM

If you are unlucky a single bit error in your Raspberry PI RAM can make the whole backup storage unwritable. In that case you’ll have to either make a new backup server and replicate everything (that is still readable) to that one, or simply start with a new backup server. The worst case is that it corrupts data in such a way that it does not detect the corruption, in which case you’ll only find there is a problem when you restore/actually want to use the backup.
That said, the probability of the RAM having problems is perhaps very low. We can probably trust the Raspberry PI foundation to have selected reliable RAM plus settings that minimize the risk of corruption.
The cloud/RAID backup storage has an advanced option “Size of in-memory write-back cache”. Per default it is disabled and you probably shouldn’t use it if you don’t have ECC-RAM as it increases the time data is kept in memory before it is written to checksum protected storage.

Discussion

Discuss the Infscape UrBackup Appliance here.

11 thoughts on “Raspberry Pi 4 backup appliance

  1. Hi. I’ve installed and am using the unmodified appliance from the supplied image on my Pi for the last few days and it is working well except for one bug and one question.

    The bug is that every time I click on the “VMs” tab the UI crashes with a Parser error – unexpected end of json input.

    The question is about accessing the VHD files. If I wanted to copy a VHD file from the Pi to my Windows machine, how could I browse to it and copy it? (the backup directories seem to need administrative access when I try to browse them over a SSH connection).

    • Yeah, I’m aware of the VM issue. I think it works on arm64 (KVM), but it’s not really usefull, because CPU emulated machines (x86) are slow and the Raspberry CPU isn’t that fast to start with…

      VHD files: If you access it via samba you can get at vhdx files. On Windows enter “\\APPLIANCENAME” in your explorer or “\\APPLIANCEIP” then login via your username (admin + admin password).
      It stores raw image files, but has a layer that transforms them to full vhdx files on the fly. If you want to access individual files using the web interface is best. I haven’t tested if the images mounted via web interface are accessible from samba…

  2. I just setup an appliance on a rpi4 as described above. I have backups running. I have a display and keyboard install, but I cannot ssh to the device. Should I be able to? How do I enable it?

    • Hi Mark,

      Under Settings->System…at the very bottom is a checkbox to enable SSH.

      This is accessing the Console with the URL of the server; not sure what you meant by using a display and keyboard.

  3. Also, I added a 4 tb drive but the storage status only shows 1tb available. There was data on the driver but when I started urbackup it formatted the drive. How do I get the entire driver to show up?

    • I suspect you are using it in cloud storage mode. In that case it stores to cloud and uses the disk as cache and cloud storage is limited to 1tb. As noted the appliance needs one ssd as system (+cache). The additional disks can then be used as storage.

  4. Thanks. Enabled ssh now I can log in to the pi.
    The 4tb drive looks like it was partitioned into multiple partitions.
    /media/backup is 1tb,
    /media/vdiskview is 1tb..

    Here is the df -k output:
    Filesystem 1K-blocks Used Avail able Use% Mounted on
    /dev/mmcblk0p2 28961792 1293056 2755 6800 5% /
    devtmpfs 1915464 0 191 5464 0% /dev
    tmpfs 1948744 8 194 8736 1% /dev/shm
    tmpfs 1948744 19344 192 9400 1% /run
    tmpfs 5120 0 5120 0% /run/lock
    tmpfs 1948744 0 194 8744 0% /sys/fs/cgroup
    tmpfs 1948744 8 194 8736 1% /tmp
    /dev/mmcblk0p1 97070 39218 5 7852 41% /boot
    /dev/mapper/LUKS-ES-f1a8bed70d5c492b999475ff72fd846a 3907010560 199700548 370633 9260 6% /media/system
    /dev/mapper/LUKS-ES-f1a8bed70d5c492b999475ff72fd846a 3907010560 199700548 370633 9260 6% /var/urbackup
    /dev/mapper/LUKS-ES-f1a8bed70d5c492b999475ff72fd846a 3907010560 199700548 370633 9260 6% /var/log
    /dev/mapper/LUKS-ES-f1a8bed70d5c492b999475ff72fd846a 3907010560 199700548 370633 9260 6% /var/cdcache
    /dev/loop0 1073740800 264497460 80837 4028 25% /media/backup
    /dev/fuse 1073740800 264497460 80837 4028 25% /media/vdiskview
    tmpfs 389748 0 38 9748 0% /run/user/1000

    The storage status says there is 1024GB available. I am running backups that will take about 1.75tb before completing. Will this FS expand when it is full?

    I have a second 4 tb drive I can connect. Should I add it, and if so, how?

  5. One more question. Things seem to be working well. But I have not configured cloud and don’t plan to.
    Activities shows “Encrypting and uploading to cloud”, paused. There are 834571 files queued(and increasing) and progress 0 bytes/401.48 gb.

    Why is this? Will this be a problem if I dont setup cloud? Can it be disabled?

    • The process tclouddrive is the top cpu user running 70%+ cpu and 25% ram, even when no backups are active. Can I disable this process?

    • Yeah, please don’t upload this stuff 😉

      Reset the appliance (Settings -> System -> reset), then start anew and make sure you don’t switch it to cloud cache mode this time and start off with using the 37€ USB-SSD as system disk as described.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.