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
粉專/IG圖文加工器

粉專/IG圖文加工器 介紹 給PS智障(ex:我)使用,用於產生圖文 腳本省去每次重複步驟 可載入圖片(方形,請先處理過,歡迎PR) 圖片簡易套用濾鏡 可將圖片切片 要求 Python 版本 3.9 安裝 安裝最新 python pip3 install -r requirement.txt 效果

Louis Tang 7 Aug 10, 2022
A Toolbox for Image Feature Matching and Evaluations

This is a toolbox repository to help evaluate various methods that perform image matching from a pair of images.

Qunjie Zhou 342 Dec 29, 2022
Program for analyzing shadows from Cassini images

Moons: An Analysis Module for Vicar Files General This packages/program was created for my bachelor's thesis for the Astronomy department at Universit

Joni 1 Jul 16, 2021
Glyphtracer is an app for converting images of letters to a font

Glyphtracer takes an image that contains pictures of several letters. It recognizes all them and lets the user tag each letter to a Unicode code point. It then converts the images to vector form and

Jussi Pakkanen 38 Dec 24, 2022
A minimal, standalone viewer for 3D animations stored as stop-motion sequences of individual .obj mesh files.

ObjSequenceViewer V0.5 A minimal, standalone viewer for 3D animations stored as stop-motion sequences of individual .obj mesh files. Installation: pip

csmailis 2 Aug 04, 2022
This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them.

Qt Photo App This is an app that allows users to upload photos and display and store the photos in a file until the user deletes them. Setup python3 -

Kathy Yang 5 Jan 22, 2022
Rembg is a tool to remove images background.

Rembg is a tool to remove images background.

Daniel Gatis 7.8k Jan 05, 2023
This piece of code is a User Welcomer with Image Manipulation using Python and Pillow (PIL).

This piece of code is a User Welcomer with Image Manipulation using Python and Pillow (PIL).

Bero 4 Jan 11, 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
Program designed to mass edit and watermark all photos in a directory

Photographer-All-In-One This is a program designed for photographers to mass edit or watermark photos (.jpg || .png) You can run this program from any

Brad Martin 2 Nov 23, 2021
PIX is an image processing library in JAX, for JAX.

PIX PIX is an image processing library in JAX, for JAX. Overview JAX is a library resulting from the union of Autograd and XLA for high-performance ma

DeepMind 294 Jan 08, 2023
Computer art based on quadtrees.

Quads Computer art based on quadtrees. The program targets an input image. The input image is split into four quadrants. Each quadrant is assigned an

Michael Fogleman 1.1k Dec 23, 2022
Gallery written in Python to manage your photos

GalleryMan Gallery written in Python to manage your photos Installation

Asian Cat 24 Dec 18, 2022
kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns

kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns. The library builds on the

pyxem 53 Dec 29, 2022
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
A large-scale dataset of both raw MRI measurements and clinical MRI images

fastMRI is a collaborative research project from Facebook AI Research (FAIR) and NYU Langone Health to investigate the use of AI to make MRI scans faster. NYU Langone Health has released fully anonym

Facebook Research 907 Jan 04, 2023
A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

CypherToad 8 Sep 12, 2022
Validate arbitrary image uploads from incoming data urls while preserving file integrity but removing EXIF and unwanted artifacts and RCE exploit potential

Validate arbitrary base64-encoded image uploads as incoming data urls while preserving image integrity but removing EXIF and unwanted artifacts and mitigating RCE-exploit potential.

A3R0 1 Jan 10, 2022
An python script to convert images to upscaled versions made out of one-colour emojis.

ABOUT This is an python script to convert png, jpg and gif(output isnt animated :( ) images to scaled versions made out of one-colour emojis. Please n

0 Oct 19, 2022
MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.

MyPaint A fast and dead-simple painting app for artists Features Infinite canvas Extremely configurable brushes Distraction-free fullscreen mode Exten

MyPaint 2.3k Jan 01, 2023