Google Photos is a fantastic service for storing and managing your photos. For users leveraging command-line tools like rclone to manage their cloud storage, adding photos to Google Photos albums might seem straightforward. However, you might encounter an issue where rclone copies photos instead of directly adding the original files to an album, leading to duplicates and potential data discrepancies.
This article delves into a user’s experience with this problem when using rclone’s move
command with Google Photos. We’ll analyze the situation, understand why this copying occurs, and explore the nuances of adding photos to Google Photos albums using rclone.
A user on the rclone forum described their challenge when attempting to add photos to a Google Photos album using the rclone move
command. They noticed that for some photos, rclone seemed to create copies within the album instead of simply adding the existing photo from their library.
Let’s examine the details they provided:
Inconsistent Behavior: Some photos were indeed added to the album as expected, while others resulted in copies. The copied photos exhibited several differences from the originals:
- Upload Source: Photos correctly added showed “Uploaded from iOS” in Google Photos details, reflecting the original upload method. Copied photos, however, indicated “Uploaded from rclone,” suggesting a re-upload process.
- File Size and Quality: Copied photos were smaller in size and described as “Backed up (1.8 MB) Original Quality,” whereas originals were larger and “Backed up (3.6 MB) Original Quality.” This size difference hints at potential re-encoding or processing during the copy.
- GPS Data Loss: A significant detail was the absence of GPS information in the copied photos within the album, while the original photos outside the album retained their location data.
This user shared screenshots illustrating these differences.
Google Photos interface showing original photo details (iOS upload, larger size, GPS) compared to a copied photo in album (rclone upload, smaller size, no GPS) illustrating the rclone 'move' command issue.
To understand what’s happening under the hood, let’s analyze the rclone command logs provided by the user.
Rclone Command and Logs Analysis:
The user employed the rclone move
command, which, despite its name suggesting a move operation, is being used in an attempt to add photos to an album. The commands used were:
rclone move remote-ap2:media/all/IMG_0759_Original.JPG remote-ap2:album/Temp_Album_20385
rclone move remote-ap2:media/all/IMG_1650_Original.JPG remote-ap2:album/Temp_Album_20385
The -vv
flag in the command provides verbose output, which is crucial for debugging. Examining the logs for the photo that was copied (IMG_0759_Original.JPG), we see these key lines:
INFO : IMG_0759_Original.JPG: Copied (new)
INFO : IMG_0759_Original.JPG: Copied (Rcat, new)
ERROR : IMG_0759_Original.JPG: Couldn't delete: google photos API only implements removing files from albums
These log entries clearly indicate that rclone performed a copy operation (“Copied (new)”, “Copied (Rcat, new)”) and then attempted to delete the original file, which failed with the message “google photos API only implements removing files from albums.” This confirms that rclone is indeed copying and then trying (unsuccessfully) to delete the original file, which is not the desired behavior for simply adding a photo to an album.
In contrast, the logs for the photo that was correctly added (IMG_1650_Original.JPG) show a different behavior, although the provided log excerpt appears to still show a copy operation initially. However, the key difference in outcome reported by the user suggests that the Google Photos API might be behaving inconsistently, or there might be subtle differences in how Google Photos handles different files or requests.
Why Does This Copying Happen?
The core issue likely stems from the limitations of the Google Photos API and how rclone interacts with it. The Google Photos API might not offer a direct “add to album” functionality in the way users expect from a file system operation like “move.”
When rclone uses the move
command in this context, it attempts to transfer the file from the source (media library) to the destination (album). Due to API constraints, instead of simply linking or referencing the existing photo in the album, rclone might be forced to re-upload the photo data to create a new entry within the album. This re-upload process results in a new, distinct photo entry in Google Photos, which is perceived as a copy.
Possible Solutions and Workarounds:
Unfortunately, based on the current understanding of the Google Photos API and rclone’s implementation, there might not be a straightforward way to force rclone to “add” photos to albums without potential copying in all cases.
Here are some points to consider and potential workarounds:
- API Limitations: The primary constraint is likely the Google Photos API itself. It’s crucial to consult the official rclone documentation and community forums for the most up-to-date information on Google Photos backend capabilities and limitations.
- Command Nuances: While
move
might seem like the closest command, exploring other rclone commands likecopy
orsync
with different flags might yield slightly different results. However, it’s unlikely these commands will fundamentally change the API’s behavior if it necessitates re-uploading for album additions. - Manual Album Management: For critical photos where avoiding copies is paramount, manual album management within the Google Photos web or mobile interface might be the most reliable approach.
- Rclone Community Discussion: Engaging with the rclone community forum (like the original poster did) is vital. Other users might have discovered specific command combinations, flags, or workarounds that can mitigate the copying issue in certain scenarios. Following discussions on GitHub or rclone forums can provide updates on any potential fixes or changes in rclone’s Google Photos backend.
In conclusion, while rclone is a powerful tool for managing Google Photos, adding photos to albums programmatically might be limited by the underlying Google Photos API. The observed copying behavior when using rclone move
is likely a consequence of these API constraints. Understanding these limitations and engaging with the rclone community are essential steps in finding the most effective way to manage your Google Photos albums using rclone.