Downloading icloud photos using icloudpd on linux, windows or mac
Downloading icloud photos using icloudpd on linux, windows or mac
icloudpd
is a third-party command-line tool to download all your iCloud Photos automatically.
Install icloudpd
Install Python3 and pip:
sudo apt update sudo apt install python3 python3-pip
Install icloudpd:
pip3 install icloudpd
Download iCloud Photos
Create a directory for your photos (e.g., /mnt/backup_photos
):
mkdir -p /mnt/backup_photos
Run icloudpd to download your photos:
icloudpd --directory /mnt/backup_photos --username your_apple_id
Authenticate:
- You’ll be prompted to enter your Apple ID password.
- If Two-Factor Authentication (2FA) is enabled, you’ll need to enter a verification code sent to your Apple devices.
Let icloudpd
sync all your photos. It will download your photos to the specified directory.
Additional Options
To download specific albums:
icloudpd --directory /mnt/backup_photos --username your_apple_id --album "Album Name"
To sync automatically:
Add icloudpd
to a cron job for regular backups.
Download Metadata (XMP File)
To download albums with metadata, include the --xmp-sidecar
option:
icloudpd --username your_apple_id --directory /mnt/backup_photos --album "Album Name" --xmp-sidecar
Delete photo in album from icloud after downloading
--delete-after-download flag requires downloading the photos first before they are deleted from iCloud --delete-after-download
option:
icloudpd --album "Album Name" --delete-after-download --directory /path/to/temp/directory
Sample Script
#!/bin/bash # Set your iCloud username username="example@icloud.com" # Set the download directory download_directory="/your-directory-path" # List of album names to download albums=( "Vacation_2025" "Family_Birthday_2024" "New_Year_Celebrations" ) for album in "${albums[@]}"; do echo "Creating directory for album: $album" # Create a folder for each album album_directory="$download_directory/$album" mkdir -p "$album_directory" # Download the album with metadata (XMP sidecar) echo "Downloading album: $album" icloudpd --username "$username" --directory "$album_directory" --album "$album" --xmp-sidecar echo "Downloaded album: $album" done echo "Download completed!"
Comments
Post a Comment
Let's discuss and learn more