Unfortunately, Google Photos API won't let us copy files from photos.google.com to a google drive rclone remote at the original quality (source), so I tried to find a way to upload them to my google drive at the original quality...
This is the best solution I could came up with so I'm sharing it just in case someone wants to do the same:
- Install Termux android app
- Install rclone on your android device following the wiki instructions
- Setup your rclone.conf file wtih the following command to create a google drive remote: rclone config
- Execute once the following command: termux-setup-storage
- Now whenever you want to upload the photos and videos recorded from your smartphone to your google drive execute the following command in Termux app:
termux-setup-storage && rclone copy "storage/dcim/Camera/" "my-googledrive:Backup--GooglePhotos/" --stats=30s -v
We can upload the exact same files we have on the phone
I guess the upload process could be automated with an app such as Tasker
The upload is done from our phone rather than our dedicated server
Files are not uploaded in f year/month folder format
Note 1: "storage/dcim/Camera/" might be a different folder on your device
Note 2: my-googledrive is the name of my remote and Backup--GooglePhotos the name of the folder where the files will be uploaded, yours can be different:
Note 3: you might want to exclude from the upload folders such as cache. I'm not sure how to do it so I didn't...