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.

22 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.

  6. I am currently testing a HP T610 (former) thinclient with two WD Elements 8TB in btrfs raid1.

    With a single client on lan and transfer set to hashed, I get about 300MBit/s.
    Do you remember the speeds you reached with a Pi4?

    Even though the T610 is fanless, it will probably consume way more energy. And since the server will probably be on idle most of the time, but never shut down, it might be worth to switch.

    Are there other pros/cons in your opinion?

    • If you already have it that is going to hard to beat (you can run your PC for a long time to get to the price of the Pi). My Pi is relatively slow, but its still random IO limited as ususal (which you’ll probably also get since you are using btrfs).
      The PI also doesn’t have hardware AES and the ethernet goes over the USB.

    • Yes, I bought the T610 before the Pi4 was even announced, but I would have another use for it.

      Right now, with just partially filled HDDs, I believe the cpu to be the limit.
      I should add, the btrfs is mounted with compress=zstd and the first image backup reaches about 400MBit/s now.

      One might also consider the T620 with a quadcore and native AES.

      I am still wondering what would be a cheap and energy efficient solution with ECC ram. Any better (smaller, fanless) option than the HP Microservers?

  7. Hi, I downloaded the image, wrote it and it booted fine, but to a command prompt, how do I get to the gui?

    Thanks

    JB

  8. Thanks, definately a duh moment for about 2 min. Then started my laptop and browsed to it. Long days in Afghanistan.

    Getting things set up. I may have questions later, looks like a great product, I’ll let you know how it goes

    JB

  9. Crazy question, does your server need to talk to the internet before it will work? Client shows “internet connection status: Waiting for local UrBackup server”. And the backups fail as soon as they try to start.

    Thanks

  10. Disregard on the internet connection. I saved the config with no strings and the backups started – compliments to all the plug and play

  11. Hi,
    One last thing, I like the software after trying it out, It’s a little clumsy at first, but most backup software packages are. How do I go about purchasing your product. can you contact me?

    Thanks

    JB

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.