Have you ever wanted to download all photos from iCloud Photos using the command line? Thanks to the third party tool icloud_photos_downloader you can do just that. Called icloudpd for short, it works to access and download photos directly from iCloud using the command line on a Mac, Windows PC, or Linux.
icloudpd is open source and you can check out source project on github if interesting.
Because icloud_photos_downloader is a Python tool, you’ll need to install Python 3.x or install Homebrew on your Mac if you haven’t already. We’re assuming you’re using Homebrew on a Mac, but if you’re using something else, use the appropriate installation method instead.
First you need to install python on your Mac if you haven’t already. If you have already installed Python before, you can skip this step.
brew install python
Once the python installation is complete, you can install the icloud_photos_downloader package with pip using the following command:
pip install icloudpd
When you’ve finished installing icloudpd, you’re ready to go.
How to download all iCloud photos via command line
Once icloudpd is installed, you can use it to upload photos directly from iCloud Photos using the iCloud API.
You’ll want to specify a directory to upload photos to, as well as your Apple ID and password, like so:
icloudpd --directory ~/iCloudPhotoBackup
--username appleID@example.com
--password examplepassword123
This will load all photos from iCloud Photos to the target directory.
Make sure you have enough free disk space to complete the download and also make sure you have some bandwidth. Loading a large number of photos can take a very long time, so if you have a library of over 100,000 images taking up 350 GB of disk space, be patient and wait for the process to complete.
When you’re done, you’ll want to look at the directory where you’ve downloaded everything so you know
There are other ways to download all photos from iCloud, including download them all from iCloud to Mac by turning off iCloud Photos, follow the same step to download them all from iCloud to iPhone or iPad using iCloud.com website . upload feature (which unfortunately limits 1,000 photos at a time, making it impractical for users with large photo libraries) or using the Upload Originals option for iCloud photos in Mac Photos (again, make sure you have enough disk space to achieve this), or you can even use Apple’s GDPR data query tool to ask you for a copy of everything Apple has, including iCloud Photos.
For what it’s worth, there are many other options and flags available for icloudpd to selectively download images from iCloud Photos. If you run icloudpd –help you will see the following options:
Usage: icloudpd.py options
Download all iCloud photos to a local directory
Options:
-d, –directory directory The local directory to use for
download
-u, –username username Your iCloud username or email address
-p, –password password Your iCloud password (default: use PyiCloud
keychain or password request)
–cookie-directory /cookie/directory
Directory for storing cookies
authentication (default: ~/.pyicloud)
-the size [original|medium|thumb] Upload image size (default: original)
–live-size photo [original|medium|thumb]
Live Photo video size to upload (default:
original)
–recent INTEGER RANGE Number of recent photos to upload
(default: upload all photos)
–until-found INTEGER RANGE Load the latest added photos while we
find x number of previously downloaded
consecutive photos (default: upload all
a photo)
-a, –album album Album to upload (default: All photos)
-l, –list-albums List available albums
–skip-videos Do not download videos (default: Download
all photos and videos)
–skip-live-photos Do not download live photos (default:
Download live photos)
–force-size Load only the requested size (default:
download the original if the size is not available)
–auto-delete Scans the Recently Deleted folder and
deletes all files found there. (If you are
restore photo in iCloud, it will be
download again)
–only-print-filenames Prints only the names of all files that are
will be downloaded (not including files that
already downloaded.)(Does not download
or delete any files.)
–folder-structure folder structure
Folder structure (default: {:%Y/%m/%d})
–set-exif-datetime Write exif tag DateTimeOriginal from
the date the file was created, if it does not exist.
–smtp-username smtp_username
Your SMTP username for sending email
two-step verification notifications
expires.
–smtp-password smtp_password
Your SMTP password for sending email
two-step verification notifications
expires.
–smtp-host smtp_host Host of your SMTP server. Default:
smtp.gmail.com
–smtp-port smtp_port Port of your SMTP server. Default: 587 (Gmail)
–smtp-no-tls Pass this flag to disable TLS for SMTP (TLS
required for Gmail)
–notification-email
The email address you want
receive email notifications. Default: SMTP
Username
–notification-script PATH Runs an external script when two factors
authentication expires. (path required:
/path/to/my/script.sh)
—log-level [debug|info|error] Log level (default: debug)
–no-progress-bar Disables the one-line progress bar and
print log messages on separate lines
(The progress bar is disabled by default if
tty not connected)
–threads-num INTEGER RANGE Number of processor threads (default: 1)
–version Show version and exit.
-h, –help Display this message and exit.
As you can see, there are quite a few customizable options available that are probably beyond the needs of most users who just want to download all their photos from iCloud to a local device or storage for backup, archiving or whatever.
Do you use icloud_photos_downloader to download all your photos from iCloud Photos? Have you used a different solution? How big was the library you downloaded? Tell us about your experience and thoughts in the comments.
The post How to upload iCloud photos via command line appeared first on Gamingsym.