Use Raspberry to back up photos instead of google photo

In June 2021 google will stop the free uploading service to google photo. The lowest plan for 100 GB is 2.99 USD / eur / month. The price they offer is quite attractive. The question is what will happen after using up 100GB. You will have 2 options, the1st option is paying for a higher package/month, the 2nd is copying all the images to the hard drive and save space for further use. Moreover, if your hard drive is full or exceeds the storage limit of your packages plan, Google will start to delete your content.

100 GB sounds like a lot, for those of you who only use your phone to take a selfie or record short videos with full HD (1080) resolution by default, it will take 2 to 3 years before you really need to upgrade to a higher package. However, for those of you who often take pictures with DSLR cameras and shoot 4k movies (I think 8k is not necessary at the moment), let try simple math: 1 raw image file from DSLR is about 30MB, one 4k video recorded in 1 minute is about 1GB. On average, you can take 50 pictures a week and shoot about 10 minutes of video. 30x50 = 1.5GB + 10GB = 11.5GB. That means in less than 10 weeks you need to upgrade to a higher package plan. As a result, you need to pay more and more for google services.

With this article, We will use Raspberry pi to create an automatic home photo backup.

Part 1: Automatic online photo backup with lomorage.

Preparation:

Raspberry pi 3 or 4, I recommend using pi 4 with usb 3.0, backup will be significantly faster.
Hard drive: 500gb or 1T, I haven’t tried a larger one but it should also work.
SD card: 16gb
Power adapter for raspberry pi type 5V 2.5A and above.

All you need to do is download the backup.img file from the following link.

or:

Using the Raspberry Pi imager to burn it to the memory card. Download here for those who don’t have it.

Ok, so it’s half done. The next thing to do is to insert the hard drive into the USB port and attach the network cable to the ethernet port of the Pi.

Download Lomorage Android or Ios app.

Connect to wifi on the same network. The App will automatically search for the raspberry, you need to create an account and password. Then you can start to backup.

You can also upload an image by opening a web browser with http: // raspberrypi-lomorage: 8001 / (replace raspberry with the one you see on the app). For example, in my case: 192.168.50.109:8001

Part 2: Automatic backup sd card, camera and your phone locally.

In this part, I will introduce the tool to back up the camera’s memory card, photos on the phone, or your camera. You just need to insert a memory card or phone and the system will automatically backup. You don't need to re-download the file or do any additional operations because the software is already pre-installed in the image file that you downloaded above.

First, you plug the hard drive into the USB 3.0 port of the Pi. Using a standard USB 3.0 memory card reader to insert the memory card into the reader and then plug it into the other USB 3.0 port (blue port).

Open the website on http: // raspberrypi: 8080 replace raspberry with the IP address of pi as in part 1. Ex: 192.168.50.109:8080. The web interface shown in the picture below will appear.

You click on the SYSTEM INFO. Scroll down to see the Device item, then stop to check where your hard drive is mounted and what the name of the hard drive is. For example, you can see in my hard drive image is sda2 nearly 476.9G capacity and my memory card is sdb1 capacity is 28.7G. Please note this section for the next step.

Press back at the bottom of the page to return to the main interface and click on the setting item. Fill in the hard drive and sd card information as shown below, if you don’t change your hard drive or memory card, you only need to do it once. Adjust Power_off = false to avoid raspberry shutdown after backup is complete. Remember to save after filling out all information.

Press back to return to the main interface. After returning to the main interface, click the backup card button. And wait until the backup is complete.

Backup directly from your phone or camera. Go to settings and edit the path to your hard drive as shown in the picture below (remember the path to your hard drive as the storage mount point above), then press save and back to return to the main screen. By default, the device will automatically back up to Pi’s internal memory.

Using the cable to plug the phone directly into the USB port of the Pi to backup. Remember to switch your phone to photo transfer mode to back up photos or transfer files or MPT on your phone to backup all the data. Finally, click on the backup camera on the web interface and take a cup of coffee =)).

References:

Those who want to make their own from scratch can check out the instructions on the lomorage github page and the little back-up box. Note that you have to change the code a bit to be able to run both. The little backup box and the lomorage both use port 8000.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store