icloud-photos-downloader / icloud_photos_downloader

A command-line tool to download photos from iCloud
MIT License
6.86k stars 554 forks source link

Are files duplicated if there are uploaded as a album #447

Open Se7enair opened 2 years ago

Se7enair commented 2 years ago

Summary

Not a new feature, just a question.

Context

I want to use ipd to save all my photos to a local fileserver to act as a archive. When the iCloud has no space left, I can delete old photos form the cloud and still have access via the archive.

If I now decide, to upload a few older pictures to share it with my wife, they will be downloaded again. After that I got a duplicate in my archive, right? Is there a way to avoid this?

Or the best thing to achieve is a exact copy of my iCloud with photos sorted in albums, or if they are not in a album, sorted with year and month. But at the same time, a archive, which saves photos which are deleted from iCloud.

The fileserver runs linux, But there is also a Mac which can run on demand.

AndreyNikiforov commented 2 years ago

I want to use ipd to save all my photos to a local fileserver to act as a archive. When the iCloud has no space left, I can delete old photos form the cloud and still have access via the archive.

That will work. Keep in mind that icloudpd is not a backup tool, but just a file copying/synchronization tool. For example if you use the tool with --auto-delete flag after you removed assets in iCloud, they will be removed in your local copy as well.

If I now decide, to upload a few older pictures to share it with my wife, they will be downloaded again. After that I got a duplicate in my archive, right?

If file exists locally, it will not be downloaded again by icloudpd.

Or the best thing to achieve is a exact copy of my iCloud with photos sorted in albums, or if they are not in a album, sorted with year and month. But at the same time, a archive, which saves photos which are deleted from iCloud.

I don't understand the question. Can you rephrase/clarify, please.

Se7enair commented 2 years ago

That will work. Keep in mind that icloudpd is not a backup tool, but just a file copying/synchronization tool. For example if you use the tool with --auto-delete flag after you removed assets in iCloud, they will be removed in your local copy as well.

Ok, got that. I try to build a archive. The archive is separately backed up. So no problem here.

If file exists locally, it will not be downloaded again by icloudpd.

Also when its moved to another folder? How is this done? Is there a integrated duplicate algorithm?

I don't understand the question. Can you rephrase/clarify, please.

In short, I try to achieve a sync to my server, which syncs every change in the iCloud. New photos, when album is created move all the photos to a new folder with album name and act as a archive (need a option to tell which photos are deleted and which should be archived, archived means, deleted from icloud, but kept in the archive)

AndreyNikiforov commented 2 years ago

If file exists locally, it will not be downloaded again by icloudpd.

Also when its moved to another folder? How is this done? Is there a integrated duplicate algorithm?

I am confused by your mentioning 'another folder'... I checked that we indeed have very poor documentation on the behavior, so it is certainly worth explaining here:

  1. icloudpd reads metadata from iCloud
  2. icloudpd checks local storage for matching metadata
    1. if path/name & size match, then file exists -- proceed to next asset
    2. if path/name matches & size does not, then file exists as "duplicate" and new file will be downloaded with adjusted name (name postfixed with -<size>)
    3. if path/name does not match, then file will be downloaded

Note that downloads are happening to temp folder and then moved to final destination to avoid partial files.

In short, I try to achieve a sync to my server, which syncs every change in the iCloud. New photos, when album is created move all the photos to a new folder with album name and act as a archive (need a option to tell which photos are deleted and which should be archived, archived means, deleted from icloud, but kept in the archive)

You are planning to move all assets to albums in iCloud and then want to sync that album to your local storage?

icloudpd supports downloading iCloud albums, but only one at a time. There is a desire to have album name supported in the --folder-structure parameters, but nobody tackled it yet.

Se7enair commented 2 years ago

For example, I download the photo to 2022/June/photo.jpg But now I move the photo to 2022/June/Album/photo.jpg

As far as I understand you, the photo will not be downloaded again, because the name und the size match to a photo in the cloud?

You are planning to move all assets to albums in iCloud and then want to sync that album to your local storage? icloudpd supports downloading iCloud albums, but only one at a time. There is a desire to have album name supported in the --folder-structure parameters, but nobody tackled it yet.

No, not all. I think --folder-structure is the thing I want. As far as it is able to move pictures local when they are moved to a album in the cloud.

My idea seems to be a bit complicated. So I may start with archiving my pictures local and see how it works. Maybe one day there will be a update with --folder-structure´ which helps me. I cannot code in python, so no possibility to help with this :(

Se7enair commented 2 years ago

So, yesterday is tried your downloader and osxphotos. osxphotos is capable of doing what I need, but it runs only on mac.

What I want to realize needs the --folder-structure with album. Additionally to that it would be nice if there is the possibility to write tags to exif. For example, album name, names of detected persons, etc.

Thats what I want: folderstructure with date and album, filename wird creationdate plus all tags from apple photos written as keywords in exif.

path/to/photos/
              2019/
                 01/
                       2022-01-01_09:15:23.jpg
                       2022-01-12_04:45:45.jpg
                       album1/
                            2022-01-14_13:12:12.jpg
                            2022-01-14_15:32:15.jpg
                 02/
                 03/
                  ...
              2020/
                 01/
                 02/
                 03/
                 ...

As far as I can see both is not possible at the moment.

The only way to support this is python? So I should learn it?