Skip to content

Instantly share code, notes, and snippets.

@qbolec
qbolec / upload_new_photos.sh
Created June 15, 2025 18:07
Syncing Google Photos Takeout to NAS
#!/bin/bash
# This tool helps you backup photos from Google Photos to your NAS
# It assumes that you have ssh access to the NAS, on which there's a directory
# in which you keep all the files from Google Photos, and wish to incrementally
# add new files found in the zip file downloaded from Google Takout.
# The tool makes effort to unzip and upload only these files which have md5sum
# different from any file already in the destination backup directory.
# It creates a subdirectory at destination with a name matching modification date of the zip,
# so it is easier to restart this on failure, and figure out what got added.