A tool to maintain an archive/mirror of your Google Photos library for backup purposes.

Overview

Google Photos Archiver

Updated Instructions 8/9/2021 Version 2.0.6

Instructions:

  1. Download the script (exe or python script listed below)
  2. Follow the instructions in the Google Slides Presentation
  3. Reference the command guide below to learn the different commands available to you.

If you need assistance or want to report an issue fill out an Issue Report or email me nick (at) ndawson.me

Downloads

Windows 10 (64-bit) Executable

If you are unfamiliar with python or computers in general I recommend you download the Win10 64bit Executable as it will not require any special installation.

Python Script

If you are familiar with python, just download the source code

Install pipenv pip install pipenv

Install dependencies using pipenv pipenv install

Commands

This guide assumes you have downloaded Google API Credentials and have them saved in some location on your computer, if you have no idea what this is please follow the Google Slides Presentation

Usage:

usage: gparch_cli.py [-h] [-c CREDENTIALS] [-t THREADS] [-a] [-s] [-f] [directory]

- If no directory arg is provided the program will default to the current working directory.
- If no credentials are provided the program will search for 'credentials.json' in the directory.
- If no download options are provided, the program will download everything.
- The program automatically skips downloading existing files so running the program with any download option after downloading items already will update everything without re-downloading or deleting existing media. It will only ensure everything is downloaded from Google Photos.

positional arguments:
  directory             directory where your photo library is saved

optional arguments:
  -h, --help            show this help message and exit
  -c CREDENTIALS, --credentials CREDENTIALS
                        path to Google Cloud OAuth2 Credentials (default: {CURRENT_DIR}/credentials.json)
  -t THREADS, --threads THREADS
                        amount of threads to use when downloading media items (default: 8)
  -d, --debug           enables debugging mode
  -a, --albums          download all albums YOU have created
  -s, --shared          download all shared albums (with you/from you)
  -f, --favorites       download all media from your library that is marked as favorite

Important Note:

In the following examples I will be using gparch_cli to run the program for readability. I am listing below all the different ways you may have to run the program to get it to work on your system.

Executable (in the same directory or in PATH)

Command Prompt: gparch_cli PowerShell: ./gparch_cli

Python Script (in the same directory or in PATH)

Windows: py gparch_cli.py Linux/Mac: python3 gpararch_cli.py

Examples

Get Help gparch_cli --help

Download everything from your library in the current directory with the credentials file in the current directory named credentials.json gparch_cli

Download everything from your library to a specific directory gparch_cli example_directory/google_photos_folder

Download everything from your library to a specific directory and specify where your credentials file is gparch_cli example_directory/google_photos_folder -c example_directory/creds.json

Download just your albums gparch_cli -a

Download just your shared albums gparch_cli -s

Download just your favorited items gparch_cli -f

Specify the amount of threads you want to download with to be 12: gparch_cli -t 12

You can combine any of the following commands to do what you specifically want.

  • If no directory arg is provided the program will default to the current working directory.
  • If no credentials are provided the program will search for 'credentials.json' in the directory.
  • If no download options are provided, the program will download everything.
  • The program automatically skips downloading existing files so running the program with any download option after downloading items already will update everything without re-downloading or deleting existing media. It will only ensure everything is downloaded from Google Photos.
Comments
  • Instructions on how to generate the .exe file

    Instructions on how to generate the .exe file

    What tool did you use to generate the .exe file? I tried pyinstaller but seems to require some extra configuration. If you used the same tool, did you have to add anything to the .spec file for resolving dependencies?

    opened by patrickjrs 4
  • RAW Images stored in Google Photos cannot be downloaded

    RAW Images stored in Google Photos cannot be downloaded

    It seems that raw photos from dedicated cameras that are stored in Google Photos won't be able to be downloaded as Python's pillow library doesn't seem to support them. As this is an upstream issue it might be difficult to find a fix, but it seems that most RAW formats aren't supported by Pillow and instead rawpy is usually used.

    I have thousands of .arw images stored in my Google Photos which is a raw image format used by almost all Sony cameras.

    Upstream Issue: https://github.com/python-pillow/Pillow/issues/3124

    ✔ Finished Downloading Shared Albums.
    
    Reading Entire Library From Server...
    
    Downloading Library:  16%|████████████████████████████████████████████▉  | 3539/22777 [00:04<00:09, 1956.83 media items/s]
    ERROR: media item could not be downloaded because: unknown file extension: .arw
    ERROR: media item could not be downloaded because: unknown file extension: .arw
    ERROR: media item could not be downloaded because: unknown file extension: .arw
    ERROR: media item could not be downloaded because: unknown file extension: .arw
    ERROR: media item could not be downloaded because: unknown file extension: .arw
    
    opened by Snuggle 3
  • Move google docs instruction file into git to be more permanent and easier to access

    Move google docs instruction file into git to be more permanent and easier to access

    Google docs tend to vanish over time. If someone finds this in a few years, after the project is long abandoned, you may have already cleaned up your docs. Or you accidentally move the file and the link will become invalid, making the project near-unusable. I recreated the instructions in an .md file right in the repo.

    opened by JuliusJacobsohn 2
  • Duplicate Name Issue

    Duplicate Name Issue

    I have a ton of duplicate named photos in my Google Photos account and it looks like the app just skips them. Happy to help troubleshoot this if needed.

    I have attached an example.

    Screenshot 2022-06-29 112855 Screenshot 2022-06-29 113016

    opened by safewithyou247 2
  • Download loses exif data and considerable size

    Download loses exif data and considerable size

    Image files downloaded from a Shared album

    1. file are severely compressed eg 2M instead of 8M
    2. EXIFdata - specifically GPS data - has been removed

    The same file downloaded through the web has all data intact

    Why is this? Can it be easily avoided?

    wontfix 
    opened by blacktav 2
  • 🐛 Fix issue where 'mediaItems' is missing from request

    🐛 Fix issue where 'mediaItems' is missing from request

    Very small fix, only add mediaItems to the list if they actually exist.

    This exception is caused by a request looking like below, missing the mediaItems but still having a nextPageToken:

    >>> print(request)
    {'nextPageToken': 'abcabc'}
    >>> media_items_list += request["mediaItems"]
    
    Traceback (most recent call last):
      File "/Volumes/Homesweet/GooglePhotoArchiver/gparch_cli.py", line 127, in <module>
        account.download_library()
      File "/Volumes/Homesweet/GooglePhotoArchiver/gparch.py", line 281, in download_library
        items = self.process_media_items(self.list_media_items(), self.lib_dir)
      File "/Volumes/Homesweet/GooglePhotoArchiver/gparch.py", line 356, in list_media_items
        media_items_list += request["mediaItems"]
    KeyError: 'mediaItems'
    

    Fixes #6

    opened by Snuggle 2
  • Program closes before making folder

    Program closes before making folder

    After following the google slides pages, everything goes through successfully. However, after seeing the confirmation page of the authentication flow working, the program closes and no folder is made. The "photoslibrary_token.pickle" is in the directory, but nothing else is created.

    opened by rw377 2
  • PhotosAccount.list_albums(): KeyError: 'albums'

    PhotosAccount.list_albums(): KeyError: 'albums'

    7f581a5b-3138-46bb-bc6e-ab968adef98d This was submitted by a user and needs to be investigated as to why this could be happening.

    Some possible fixes would be to add better debugging and add exceptions for this type of error to find the cause.

    opened by nmd2117 1
  • Unable to Run to get all Albums or Photos

    Unable to Run to get all Albums or Photos

    Hello,

    I have no problem downloading favorites or shared albums, however when I attempt to download albums or photos I encounter: KerError: 'albums' for Albums, or gparch_cli: error: unrecognized arguments: Photos.

    Otherwise this is a fantastic tool that does exactly what I've been looking for as Google Takeout is completely broken for me.

    opened by cobra88king8 1
  • Exe stops right after starting

    Exe stops right after starting

    Followed the instructions, everything seemed fine, but the exe doesn't start downloading. Managed to time this screenshot just right, before it quits.

    image image

    opened by BalazsAdorjan 1
  • fix googleapiclient.errors.UnknownApiNameOrVersion: name: photoslibrary  version: v1

    fix googleapiclient.errors.UnknownApiNameOrVersion: name: photoslibrary version: v1

    I was getting the following error running this on my mac:

    Getting API Service...
    Traceback (most recent call last):
      File "/Users/gligoran/dev/GooglePhotosArchiver/google_photos_archiver.py", line 50, in <module>
        service = get_service()
      File "/Users/gligoran/dev/GooglePhotosArchiver/google_photos_archiver.py", line 32, in get_service
        return build('photoslibrary', 'v1', credentials=creds)
      File "/usr/local/lib/python3.9/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
        return wrapped(*args, **kwargs)
      File "/usr/local/lib/python3.9/site-packages/googleapiclient/discovery.py", line 291, in build
        content = _retrieve_discovery_doc(
      File "/usr/local/lib/python3.9/site-packages/googleapiclient/discovery.py", line 405, in _retrieve_discovery_doc
        raise UnknownApiNameOrVersion("name: %s  version: %s" % (serviceName, version))
    googleapiclient.errors.UnknownApiNameOrVersion: name: photoslibrary  version: v1
    

    This addition fixed it for me.

    opened by gligoran 1
  • Bump certifi from 2021.10.8 to 2022.12.7

    Bump certifi from 2021.10.8 to 2022.12.7

    Bumps certifi from 2021.10.8 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pillow from 9.0.1 to 9.3.0

    Bump pillow from 9.0.1 to 9.3.0

    Bumps pillow from 9.0.1 to 9.3.0.

    Release notes

    Sourced from pillow's releases.

    9.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.3.0 (2022-10-29)

    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

    • Initialize libtiff buffer when saving #6699 [radarhere]

    • Inline fname2char to fix memory leak #6329 [nulano]

    • Fix memory leaks related to text features #6330 [nulano]

    • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

    • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

    • Fixed set_variation_by_name offset #6445 [radarhere]

    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

    • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

    • Added ExifTags enums #6630 [radarhere]

    • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

    • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

    • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

    • Added GPS TIFF tag info #6661 [radarhere]

    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

    • Do not attempt normalization if mode is already normal #6644 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Photos not downloading

    Photos not downloading

    I have about 62k photos in my Google Photos, after downloading all my favourites, albums and shared albums, the app downloaded about 3800 photos from my library and then stopped downloading. The progress bar suddenly started flying up very quickly but no new photos are being saved to my device and the available storage on my hard drive isn’t changing at all - it runs until completion with no errors but no additional photos are downloaded. This happened yesterday, tried again today with the same result. Happy to provide any info that might be helpful! Thanks

    opened by nathbullen 0
  • Bump oauthlib from 3.2.0 to 3.2.1

    Bump oauthlib from 3.2.0 to 3.2.1

    Bumps oauthlib from 3.2.0 to 3.2.1.

    Release notes

    Sourced from oauthlib's releases.

    3.2.1

    In short

    OAuth2.0 Provider:

    • #803 : Metadata endpoint support of non-HTTPS
    • CVE-2022-36087

    OAuth1.0:

    • #818 : Allow IPv6 being parsed by signature

    General:

    • Improved and fixed documentation warnings.
    • Cosmetic changes based on isort

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oauthlib/oauthlib/compare/v3.2.0...v3.2.1

    Changelog

    Sourced from oauthlib's changelog.

    3.2.1 (2022-09-09)

    OAuth2.0 Provider:

    • #803: Metadata endpoint support of non-HTTPS
    • CVE-2022-36087

    OAuth1.0:

    • #818: Allow IPv6 being parsed by signature

    General:

    • Improved and fixed documentation warnings.
    • Cosmetic changes based on isort
    Commits
    • 88bb156 Updated date and authors
    • 1a45d97 Prepare 3.2.1 release
    • 0adbbe1 docs: fix typos
    • 6569ec3 docs: Fix a few typos
    • bdc486e Fixed isort imports
    • 7db45bd Fix typo in server.rst
    • b14ad85 chore: s/bode_code_verifier/body_code_verifier/g
    • b123283 Allow non-HTTPS issuer when OAUTHLIB_INSECURE_TRANSPORT. (#803)
    • 2f887b5 Docs: fix Sphinx warnings for better ReadTheDocs generation (#807)
    • d4bafd9 Merge pull request #797 from cclauss/patch-2
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Feature: Add media metadata after download

    Feature: Add media metadata after download

    Hi, just recently installed the archiver. Thanks for this usefull tool. Could it be possible to add geolocation metadata to the file downloaded (in fact all metadata available in json file from the library. I saw you have already exif tools (from issue#16 comments), do you think it is possible ? Thanks.

    opened by patxixi 0
  • Down

    Down

    Hi, I managed to download everything and it seems (judging by the size) the photos have been added to the SQLite Photo library, however, when I open Photos I see no photos. I'm using Mac Catalina (iMac).

    Downloading Library: 100%|████| 56569/56569 [1:01:12<00:00, 15.40 media items/s] ✔ Finished Downloading Everything.

    opened by ccjcan 0
Releases(2.2.0)
Owner
Nick Dawson
SE Student at Rochester Institute of Technology that has a passion for learning, coding, and automation. I'm pursuing a career as a Software Engineer.
Nick Dawson
A simple python script to reveal the contents of a proof of vaccination QR code.

vaxidecoder A simple python script to reveal the contents of a proof of vaccination QR code. It takes a QR code image as input, and returns JSon data.

Hafidh 2 Feb 28, 2022
The coolest python qrcode maker for small businesses.

QR.ify The coolest python qrcode maker for small businesses. Author Zach Yusuf Project description Python final project. Built to test python skills P

zachystuff 2 Jan 14, 2022
Create QR Code for link using Python

Quick Response QR is short and named for a quick read from a cell phone. Used to view information from transitory media and put it on your cell phone.

Coding Taggers 1 Jan 09, 2022
A linear stairs generation add-on for Blender

Linear Stairs Generator Table of Contents Installation Usage Screenshots Important Notes Requirements Blender 3.0 or newer. Installation: Download a z

Elhanan Flesch 4 May 17, 2022
Python Image Optimizer Script

Image-Optimizer Download and Install git clone https://github.com/stefankumpan/Image-Optimizer-Script.git cd Image-Optimizer-Script pip install -r req

Stefan Kumpan 0 Jul 15, 2021
A GUI-based (PyQt5) tool used to design 2D linkage mechanism.

Pyslvs-UI A GUI-based (PyQt5) tool used to design 2D linkage mechanism. Planar Linkages Simulation Python-Solvespace: Kernel from Solvespace with Cyth

Yuan Chang 141 Dec 13, 2022
3D printer / slicing GUI built on top of the Uranium framework

Cura Ultimaker Cura is a state-of-the-art slicer application to prepare your 3D models for printing with a 3D printer. With hundreds of settings and h

Ultimaker 4.4k Jan 02, 2023
Extract the temperature data of each wire from the thermal imager raw data.

Wire-Tempurature-Detection Extract the temperature data of each wire from the thermal imager raw data. The motivation of this computer vision project

JohanAckerman 1 Nov 03, 2021
Simple utility to tinker with OPlus images

OPlus image utilities Prerequisites Linux running kernel 5.4 or up (check with uname -r) Image rebuilding Used to rebuild read-only erofs images into

Wiley Lau 15 Dec 28, 2022
Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard.

Vignette Vignette is a Python library to create and manage thumbnails following the FreeDesktop standard. Thumbnails are stored in a shared directory

3 Feb 06, 2022
A simple image to text converter with GUI!

TEXTEMAGE! Textemage is a quick tool that extracts text from images, it is a Python based GUI program(also available in executable version). This is a

Akascape 5 Oct 26, 2022
Photini - A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS.

A free, easy to use, digital photograph metadata (Exif, IPTC, XMP) editing application for Linux, Windows and MacOS. "Metadata" is said to mea

Jim Easterbrook 120 Dec 20, 2022
imgAnalyser - Un script pour obtenir la liste des pixels d'une image correspondant à plusieurs couleurs

imgAnalyser - Un script pour obtenir la liste des pixels d'une image correspondant à plusieurs couleurs Ce script à pour but, à partir d'une image, de

Théo Migeat 1 Nov 15, 2021
Change the image one color channel at a time.

Building-a-Contact-Sheet This hands-on Project is in Python 3 Programming Specialization offered by University of Michigan via Coursera. change the im

Eszter Pai 1 Jan 03, 2022
Python avatar generator for absolute nerds

pagan Welcome to the Python Avatar Generator for Absolute Nerds. Current version: 0.4.3 View the change history here. Remember those good old days whe

David Bothe 280 Dec 16, 2022
Generate meme GIFs in which an image you choose can be viewed by the user only after they wait a whole hour.

Generate meme GIFs in which an image you choose can be viewed by the user only after they wait a whole hour.

Feliks Maak 1 Jan 31, 2022
This is a python project which detects color of an image when you double click on it.

This is a python project which detects color of an image when you double click on it. You have to press ESC button to close the pop-up Image window. There are mainly two library CV2 and Pandas that a

Yashwant Kumar Singh 0 Aug 16, 2022
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

1 Nov 09, 2021
A small Python module for BMP image processing.

micropython-microbmp A small Python module for BMP image processing. It supports BMP image of 1/2/4/8/24-bit colour depth. Loading supports compressio

Quan Lin 4 Nov 02, 2022
Tool made for the FWA Yearbook Team to resize multiple images quickly.

ImageResize Tool Tool made for the FWA Yearbook Team to resize multiple images quickly. Make sure to check this repo for future updates How to Use The

LGobin 1 Jan 07, 2022