gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 163 forks source link

How to use comparison feature? #325

Closed mlangenberg closed 2 years ago

mlangenberg commented 2 years ago

I would like to know which photos I have deleted on Google Photos, so I can replicate those deletes on my local drive.

To test this, I started with an empty account and I uploaded a folder /photos with sample photos—in original quality—via the web interface. Then I created a new index.

gphotos-sync --index-only target

I proceeded to delete a few photos using the Google Photos web interface and tried to compare the index against the local folder.

gphotos-sync --index-only --compare-folder photos target

Expected behavior I would expect the target/comparison/missing_files folder to contain symlinks to only the files that are still in my local folder, but not in Google Photos.

Actual behavior The target/comparison/missing_files folder contains a symlink to every photo in my local folder.

Am I doing something wrong?

gilesknap commented 2 years ago

I'm pretty sure the issue is that the comparison works off the files not the index. So, your --index-only is the issue.

I can see the use case for using the index only, but this is a complicated algorithm that looks inside of the files to help with matching.

I should also warn you that this feature was written a long time ago and I have not used it for years. I'm unlikely to be able to fix any issues you find in the comparison.


From: Matthijs Langenberg @.> Sent: 23 September 2021 14:33 To: gilesknap/gphotos-sync @.> Cc: Subscribed @.***> Subject: [gilesknap/gphotos-sync] How to use comparison feature? (#325)

I would like to know which photos I have deleted on Google Photos, so I can replicate those deletes on my local drive.

To test this, I started with an empty account and I uploaded a folder /photos with sample photos—in original quality—via the web interface. Then I created a new index.

gphotos-sync --index-only target

I proceeded to delete a few photos using the Google Photos web interface and tried to compare the index against the local folder.

gphotos-sync --index-only --compare-folder photos target

Expected behavior I would expect the target/comparison/missing_files folder to contain symlinks to only the files that are still in my local folder, but not in Google Photos.

Actual behavior The target/comparison/missing_files folder contains a symlink to every photo in my local folder.

Am I doing something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/gilesknap/gphotos-sync/issues/325, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHLRW3EX7DDJMYADET7PX3UDMUCDANCNFSM5ETWNVMQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

mlangenberg commented 2 years ago

I see. Thanks for your quick reply. I'm trying to fine tune my Google Photos workflow. I store all my photos on a NAS and I regard that as my master copy. Google Photos is great for reliving memories with its timeline view and curating photos is also easier compared to sifting through folders on a network drive.

So what I do is that I add photos from my mirrorless camera to my NAS and use https://gphotosuploader.github.io/gphotos-uploader-cli to upload those to Google Photos. Once every quarter, I download the photos I have taken with my phone using the web interface (in original quality, including GPS tags) and store those on my NAS as well.

These days I'm a lot more selective about the photos I want to keep—admittedly, inspired by https://youtu.be/GLy4VKeYxD4 —but there are years and years in which I have never deleted any taken photo. In order to clean up my Photo library, my ideas is to use Google Photo's interface and then replicate those changes locally. But that might be too far-fetched.

gilesknap commented 2 years ago

Google Photos is close to being superb but falls short of it in enough ways to be really annoying.

The API is crippled, and over the past few years I have come to believe that this is deliberate to lock in users.

Before Google Photos I curated my collection very carefully and always used filesystem only so I could switch tools when better viewers/organizers came along. When I switched to Google, I wrote gphotos-sync as my get out clause so that I could switch back out again. But it is not a get out clause because the backup is incomplete due to many limitations of the API, most notibly:

There is a route out using Google Takeout but the rub is that the service is so good I don't want to give it up. So, they got their lock in 🙂

My workflow is now this.

If you pay for storage, and send your offline camera photos to Google regularly, then the above approach might just work for you. But you are relying on Google as the holder of your originals since the backups will be compressed.

To do what you are trying to now would require more metadata in the Google Photos API, it is currently extremely limited and hence the need to download the entire library to do the comparison.

I am happy to kick around any ideas if you want to continue this thread. I also have come to regret the 'keep all photos cos its easy' approach that I now have. Before Google Photos I really looked after my collection, and I find that I valued it more as a result. Having said that Google does a good job of keeping your memories alive with the automatic collections and memories.


From: Matthijs Langenberg @.> Sent: 23 September 2021 21:35 To: gilesknap/gphotos-sync @.> Cc: Knap, Giles (DLSLtd,RAL,LSCI) @.>; Comment @.> Subject: Re: [gilesknap/gphotos-sync] How to use comparison feature? (#325)

I see. Thanks for your quick reply. I'm trying to fine tune my Google Photos workflow. I store all my photos on a NAS and I regard that as my master copy. Google Photos is great for reliving memories with its timeline view and curating photos is also easier compared to sifting through folders on a network drive.

So what I do is that I add photos from my mirrorless camera to my NAS and use https://gphotosuploader.github.io/gphotos-uploader-cli to upload those to Google Photos. Once every quarter, I download the photos I have taken with my phone using the web interface (in original quality, including GPS tags) and store those on my NAS as well.

These days I'm a lot more selective about the photos I want to keep—admittedly, inspired by https://youtu.be/GLy4VKeYxD4 —but there are years and years in which I have never deleted any taken photo. In order to clean up my Photo library, my ideas is to use Google Photo's interface and then replicate those changes locally. But that might be too far-fetched.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/gilesknap/gphotos-sync/issues/325#issuecomment-926134132, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHLRW7LKINUAY5Q3RDTNOTUDOFQLANCNFSM5ETWNVMQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom