Code Monkey home page Code Monkey logo

google-photos-backup's Introduction

Google Photos Backup

Dockerized process to backup Google Photos to Backblaze B2 -- intended to be an ephemeral job every 24 hours (Kubernetes job, cron, etc)

When using volume mounts, this container is idempotent. It can be ran multiple times and only sync new photos. Photos will stay on the host's machine and be used in future runs to determine what new photos need to be uploaded to Backblaze.

The first run of this container will take several hours depending on the number of photos in your Google Photos account, and your Internet speed. Subsequent runs should only take a few seconds.

Requirements

Instructions

  • Create a Google Cloud project and download the project's client_secret.json file. Save it to a location that you plan to mount to the Docker container (ex. /data/config/client_id.json).
  • Create an empty directory on the host to store the Google photos (ex. /data/photos).
  • Prepare the environment variables
    • STORAGE_DIR: Directory to download the Google photos.
    • CLIENT_SECRET: Full path to the client_id.json file.
    • B2_BUCKET: Name of your Backblaze B2 Bucket.
    • B2_KEY_ID: Backblaze Application Key ID.
    • B2_APP_KEY: Backblaze Application Key.
    • HEALTH_CHECK_URL HealthCheck URL to ping when the job completes (not required)
  • Start the Docker container with the required environment variables and mount your directory.

Example

docker run --rm \
  -v /data:/data \
  -e B2_BUCKET="my_bucket" \
  -e B2_KEY_ID="my_id" \
  -e B2_APP_KEY="my_secret" \
  -e STORAGE_DIR="/data/photos" \
  -e CLIENT_SECRET="/data/config/client_id.json" \
  -e HEALTH_CHECK_URL="https://hc-ping.com/your-uuid-here" \
  ghcr.io/tylerodonnell/google-photos-backup:latest

Credits

google-photos-backup's People

Contributors

tylerodonnell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.