Little Backup Box August 2019 update

Unexpectedly, August turned out to be a very busy month for the Little Backup Box project. It all started with a user having a problem with the current implementation of the internal backup feature. When figuring out how to solve the problem, I ended up reimplementing the entire functionality altogether. Now the internal backup has its own button in the web UI, and you can select it to be the default mode during installation. The Samba and DLNA servers can now handle internal storage, so you can access and view the content transferred to the internal storage card.

As an experiment, I’ve added internationalization (i18n) support for the web UI, so you can use it in your own language (you have to translate it first, though). Speaking of the web UI, I also made slight improvements to its appearance. You’ll probably notice that all buttons have uniform width now.

Finally, I’m been experimenting with an inexpensive 128x32 OLED display, and I added support for it in Little Backup Box. You have the option of enabling OLED support during installation. If you choose to do that, the OLED display will show the machine’s IP address on boot.


Looks Good.

Presumably that’s using I2C bus for communications? I’m hoping to try and create a design for a backup box and this would be a great additions.

Hoping to have a PI with a built in battery, SSD storage and display.

1 Like

That’s correct: the I2C bus. I improved the support over the weekend. Now the display provides somewhat more useful feedback (IP address, storage and card status, etc.). However, there is one tough nut I can’t crack on my own. I want the display to show the progress of the backup operation. But so far, this task proved to be beyond my limited coding skills.

1 Like

That would be very useful.

It’s been a while since I checked the scripts. Do you use Rsync for the copying? If so you can either get the percentage of files dealt with (not necessarily transferred if they are the same) or you can use “pv” to calculate percentage if you count files first.

This could be parsed from the commandline and sent to the display.

That’s where the limited coding skills come into play. :slight_smile:

Shows how to get the data from a running Rsync command in BASH. Can you send a string to the OLED from the BASH prompt?

May have a try at writing a little script over the next few weeks.

1 Like

That would be really great! Thanks.

1 Like

Could you post a link to the screen you bought and the software library you’re using to control the screen?

I think I’ve worked out how to extract

  • the filename
  • total transfer percentage
  • transfer rate

I will finish testing that basic script this week.

The next steps I need to do are to:

  • Ensure I’m using the same rsync command as you are in LBB
  • Format the text correctly so that it fits on the display
  • Pipe/Redirect the text to the display
  • Comment the code

That sounds great! I’m using a generic 128x32 OLED display based on the SSD1306 controller similar to this one: along with the following:

Kind regards,

OK, I’ve ordered a screen so I can test the code.

1 Like

I now have a working OLED display and hope to have a merge request in the next week or so.

Fantastic! Thank you so much!

I’ve added a merge request, it’s behind the master branch, so it may be easier to copy the relevant functionality (the rsync lines) in to the scripts.

It has an

script which reads the output from the rsync command, formats it and outputs it to the oled. It requires a file called exclude.txt (I couldn’t work out how to make it work without one).

I ran it from a git clone rather than using your install script, so it may have had a sudo added in places that aren’t needed.

I also had to add a


call to the USB stick.

I added in a lot of debug info, which you may wish to remove.

Finally I had an issue where sometimes running


caused a segfault, whereas running


never did.

PS could you let me know if/when you’ve incorporated the functionality. I’d like to do a fresh install on the Pi using the install script.

Thank you so much for the pull request! I need a day or two to test it in the experimetal branch. I’ll let you know when I merge your improvements into the master branch.

Thinking about the oled call segfaulting. I’m wondering if it makes a call to the font files, which it can’t find. I didn’t run GDB to find out what call caused the segmentation fault.

This is fantastic. can’t wait to try this myself.