Wednesday, July 28, 2021

Dockerizing gphotos-sync for Raspberry PI

So, 11 years after the last time I posted it is time for a new post!

All my photo's I take on my phone are sent to Google Photos, which I then backup to my NAS. But as it turns out Google stopped syncing Google Photos to Google Drive in 2019 so that was the latest photos I had synced. Luckily I stumbled upon an article explaining that and that gave me time to figure out a new solution.

The sync script of gilesknap seems like a perfect fit: it is even available as a docker container. If only it could run on my Raspberry PI! Here's what I did to fix this:
  1. Clone the repository (#git clone
  2. Build the docker container on the RPI (#docker build -t rogierg/gphotos-sync:0.0.1 .)
  3. Run the newly built docker container (#docker run --rm -it --name gphotos-sync -v /[Local Storage]:/storage -v /opt/gphotos-sync/client_secret.json:/config/client_secret.json:ro rogierg/gphotos-sync:0.0.1 --log-level INFO --db-path /config /storage