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 Streamlit Component to compare images in Streamlit apps. It integrates Knightlab's JuxtaposeJS

streamlit-image-juxtapose A simple Streamlit Component to compare images in Streamlit apps using Knightlab's JuxtaposeJS. The images are saved to the

Robin 30 Dec 31, 2022
Pnuemonia Normal detection by using XRay images.

Pnuemonia Normal detection by using XRay images. Got image datas from kaggle(link is given in sources.txt file) also normal xray images from other site (also link is given) in order to avoid data dis

Zarina 1 Feb 28, 2022
An add to make adding screenshots and copied images to the scene easy

Blender Clipboard to Scene It doesn't work with version 2.93 and higher (I tested it on 2.91 and 2.83) There is an issue with importing the Pillow mod

Mohammad Mehdi Afkhami 3 Dec 29, 2021
ImageStrike是一款用于CTF中图片隐写的综合利用工具

🎈 简介 ImageStrike是一款使用PyQT5开发,用于CTF中图片隐写的综合利用工具

zR00t1 133 Dec 27, 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
A sketch like(?) effect for images

lineArt A sketch like(?) effect for images How to run main.py [filename] [option {1,2}] option 1 retains colour option 2 gives gray image #results ori

1 Oct 28, 2021
An automated Comic Book downloader (cbr/cbz) for use with SABnzbd, NZBGet and torrents

Mylar Note that feature development has stopped as we have moved to Mylar3. EOL for this project is the end of 2020 and will no longer be supported. T

979 Dec 13, 2022
Digital image process Basic algorithm

These are some basic algorithms that I have implemented by my hands in the process of learning digital image processing, such as mean and median filtering, sharpening algorithms, interpolation scalin

JingYu 2 Nov 03, 2022
OctoPrint is the snappy web interface for your 3D printer!

OctoPrint OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software and released under the GNU Affero Genera

OctoPrint 7.1k Jan 03, 2023
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

1 Dec 18, 2021
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random par

Sepand Haghighi 947 Dec 30, 2022
利用近邻法的弱点实现图片缩小后变成另一张图

这是我一个视频的配套代码。 视频是:利用近邻法的弱点实现图片缩小后变成另一张图 https://www.bilibili.com/video/BV1Lf4y1r7dZ 配套代码中,仅generate.py是核心文件,其余的图片神马的,都是赠品。 这个核心文件利用了近邻法缩放的弱点,可以将图a的像素按

偶尔有点小迷糊 182 Dec 19, 2022
Kainat 13 Mar 07, 2022
🛹 Turn an SVG into an STL for stencil creation purposes

svg2stl This repository provides a script which takes as input an SVG such as this one: It outputs an STL file like this one: You can also see an inte

Max Halford 3 Dec 29, 2021
Gaphor is the simple modeling tool

Gaphor Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implemen

Gaphor 1.3k Dec 31, 2022
Python library that finds the size / type of an image given its URI by fetching as little as needed

FastImage This is an implementation of the excellent Ruby library FastImage - but for Python. FastImage finds the size or type of an image given its u

Brian Muller 28 Mar 01, 2022
With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen

Oraxen-item-to-yml With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen How to use Install the

Akex 1 Dec 29, 2021
QSIprep: Preprocessing and analysis of q-space images

QSIprep: Preprocessing and analysis of q-space images Full documentation at https://qsiprep.readthedocs.io About qsiprep configures pipelines for proc

Lifespan Informatics and Neuroimaging Center 88 Dec 15, 2022
starfish is a Python library for processing images of image-based spatial transcriptomics.

starfish: scalable pipelines for image-based transcriptomics starfish is a Python library for processing images of image-based spatial transcriptomics

199 Dec 08, 2022
An executor that wraps 3D mesh models and encodes 3D content documents to d-dimension vector.

3D Mesh Encoder An Executor that receives Documents containing point sets data in its blob attribute, with shape (N, 3) and encodes it to embeddings o

Jina AI 11 Dec 14, 2022