Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 2.57 KB

README.md

File metadata and controls

44 lines (26 loc) · 2.57 KB

pi-traveler-backup

A hackathon project to turn your Raspberry into a standalone offline backup module. Never loose your precious travel photos again!

Project demo video

How to use it

  • Plug the USB drives that way:
    Image describing the USB ports used for pi-traveler-backup

Setup

0. Prerequisites

To run this project you need to have:

  1. A Raspberry Pi (this projects runs on Raspberry Pi 3, but should be quite easily portable to other versions, the main difference being the mapping on the physical USB port used for input and for output)

  2. A 128x32 LCD screen (similar to this one) to display backup status

  3. A push button (such as this one) to start/stop the backup

  4. 2 USB drives : 1 to be used as backup and 1 as data source

  5. A bunch of wires!

1. Hardware wiring

We'll use this documentation page as a reference: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#gpio-and-the-40-pin-header

Raspberry GPIO reference

  • Plug the LCD screen to the pins 1 (VCC),2 ,5 and 9 (GND)
  • Plug the button to the pin 10 (RXD) and 1 (VCC)
  • (Optional) The USB drives to use for the backup are hardcoded for the Raspberry Pi 3b. If you have another Raspberry Pi or want to change these ports, you'll need to update the devices to use in backup.sh.

2. Raspberry setup

  1. Create a user named hackathon and add it to the storage group

  2. Add Polkit permissions to mount the drive as user level : copy 10-udisk.pkla from this project to /etc/polkit-1/localauthority/50-local.d/10-udisks.pkla

    ⚠️ This works only for old versions of Policy Kit which support only this config file format. This is the case as of today on current Raspbian images. If you see a folder /etc/polkit-1/localauthority/ it means that it will also work for you. Otherwise, you need to use the Javascript format (take a look here).

  3. Setup the background service to launch on startup: copy photo-backup.service from this project to /etc/systemd/system/photo-backup.service

  4. Restart!