Repository navigation
[ProtonDrive] 1.75.0 appears to cause issues with the 422->404 sequence when using restic #9722
Description
Before you start
- I have searched the forum and the existing issues for this problem.
- I have tested with the latest beta or stable release and can still reproduce the problem.
- This is a reproducible bug, not a usage question (questions belong on the forum).
Associated forum post URL
No response
What is the problem you are having with rclone?
After updating from 1.74.4 to 1.75.0, the quick-handling of the Code=2500, Status=422 issues seems to cause restic repository corruption. I've attached logs below.
For context:
-the repository was last synced about 3 weeks ago using --checkdata (i.e. a full read of the data was performed and returned a clean result)
-I ran the backup command for the first time since the repository was confirmed clean.
-The "error dance" appears to have corrupted (partially uploaded) one of the packs.
-The restic repository needed to be cleaned/reindexed and re-backed up to fix the partially uploaded file issue.
-I have not changed the restic binary (0.19.0). rclone is the only binary that has been updated.
rclone version
rclone v1.75.0
- os/version: debian 12.11 (64 bit)
- os/kernel: 6.12.95-production+truenas (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.5
- go/linking: static
- go/tags: none
Operating system
Linux
Which cloud storage system are you using?
Proton Drive
Output of rclone config redacted
[protondrive]
type = protondrive
username = [email protected]
password = XXX
2fa = XXXXXX
client_uid = XXX
client_access_token = XXX
client_refresh_token = XXX
client_salted_key_pass = XXXThe command you were trying to run
/mnt/tank/Programs/restic/restic -r rclone:protondrive:restic/docker-setup --password-file /root/.restic_password -o rclone.program=/mnt/tank/Programs/rclone/rclone -o rclone.args="serve restic --stdio --config=/root/.config/rclone/rclone.conf" backup "/mnt/Apps/docker-setup"A log from the command with the -vv flag
This error was produced in the circumstances outlined above, so logs with -vv are not available. However here are the logs that were captured as a part of the process:
=== Mon Aug 3 04:03:16 : Running job 'docker-data' ===
=== Mon Aug 3 04:03:16 : Starting backup 'docker-data' of /mnt/Apps/docker-data to rclone:protondrive:restic/docker-data ===
2026-08-03 04:04:12 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
2026-08-03 04:04:42 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
2026-08-03 04:05:12 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
2026-08-03 04:05:42 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
rclone: 2026/08/03 04:05:54 NOTICE: proton drive root link ID 'restic/docker-data': 502 POST https://fra-storage.proton.me/storage/blocks: 502 Bad Gateway (Code=0, Status=502), Attempt 1
rclone: 2026/08/03 04:05:54 ERROR : proton drive root link ID 'restic/docker-data': 502 POST https://fra-storage.proton.me/storage/blocks: 502 Bad Gateway (Code=0, Status=502)
rclone: 2026/08/03 04:06:00 NOTICE: proton drive root link ID 'restic/docker-data': 422 POST https://drive-api.proton.me/drive/shares/redacted/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
rclone: 2026/08/03 04:06:00 ERROR : proton drive root link ID 'restic/docker-data': 422 POST https://drive-api.proton.me/drive/shares/1redacted/files: A file or folder with that name already exists (Code=2500, Status=422)
rclone: 2026/08/03 04:06:09 NOTICE: proton drive root link ID 'restic/docker-data': 404 POST https://fra-storage.proton.me/storage/blocks: This file has been removed. (Code=2501, Status=404), Attempt 1
rclone: 2026/08/03 04:06:09 ERROR : proton drive root link ID 'restic/docker-data': 404 POST https://fra-storage.proton.me/storage/blocks: This file has been removed. (Code=2501, Status=404)
2026-08-03 04:06:12 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
rclone: 2026/08/03 04:06:13 NOTICE: proton drive root link ID 'restic/docker-data': 404 POST https://fra-storage.proton.me/storage/blocks: This file has been removed. (Code=2501, Status=404), Attempt 1
rclone: 2026/08/03 04:06:13 ERROR : proton drive root link ID 'restic/docker-data': 404 POST https://fra-storage.proton.me/storage/blocks: This file has been removed. (Code=2501, Status=404)
2026-08-03 04:06:42 - progress: 54.1% | files 41039/71647 | data 21.8 GiB/40.2 GiB
2026-08-03 04:07:12 - progress: 55.7% | files 43082/71647 | data 22.4 GiB/40.2 GiB
2026-08-03 04:07:42 - progress: 55.7% | files 43082/71647 | data 22.4 GiB/40.2 GiB
2026-08-03 04:08:13 - progress: 56.3% | files 44221/71647 | data 22.7 GiB/40.2 GiB
2026-08-03 04:08:43 - progress: 56.3% | files 44221/71647 | data 22.7 GiB/40.2 GiB
2026-08-03 04:09:13 - progress: 95.6% | files 51728/71647 | data 38.5 GiB/40.2 GiB
2026-08-03 04:09:43 - progress: 96% | files 52045/71647 | data 38.6 GiB/40.2 GiB
2026-08-03 04:10:13 - progress: 96% | files 52045/71647 | data 38.6 GiB/40.2 GiB
2026-08-03 04:10:43 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:11:13 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:11:43 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:12:13 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:12:43 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:13:13 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:13:43 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:14:13 - progress: 100% | files 71647/71647 | data 40.2 GiB/40.2 GiB
2026-08-03 04:14:28 - summary: snapshot af79056f94d5b5610b29f921e02510871f07f2201066994ecf9c46f1b4f9111f | 11645 new, 2256 changed, 57746 unchanged | processed 40.2 GiB in 669.10175121s
=== Mon Aug 3 04:14:29: Forgetting old snapshots for 'docker-data' ===
Applying Policy: keep 7 daily, 4 weekly, 6 monthly snapshots
keep 3 snapshots:
ID Time Host Tags Reasons Paths Size
-----------------------------------------------------------------------------------------------------------------
953d7bf7 2026-07-07 09:34:31 truenas daily snapshot /mnt/Apps/docker-data 39.865 GiB
weekly snapshot
oldest monthly snapshot
627c2a84 2026-07-13 15:56:17 truenas daily snapshot /mnt/Apps/docker-data 39.930 GiB
weekly snapshot
monthly snapshot
af79056f 2026-08-03 04:03:16 truenas daily snapshot /mnt/Apps/docker-data 40.242 GiB
weekly snapshot
monthly snapshot
-----------------------------------------------------------------------------------------------------------------
3 snapshots
=== Mon Aug 3 04:15:00: Pruning repository for 'docker-data' ===
loading all snapshots...
finding data that is still in use for 3 snapshots
[0:00] 100.00% 3 / 3 snapshots
searching used packs...
collecting packs for deletion and repacking
pack ba89add8: calculated size 135940139 does not match real size 35276843
Run 'restic repair index'
[4:05] 72.37% 165 / 228 packs processed
Fatal: pack size does not match calculated size from index
=== Mon Aug 3 04:19:41: Job 'docker-data' FAILED with exit code 1 ===
=== Mon Aug 3 04:19:41: Restic orchestration failed ===Anything else?
Thanks to those who have worked on the Proton Drive integration. It's had a troubled history, and I appreciate the time and effort that's been put into reviving it!
Activity
ncw commentedon Aug 3, 2026
This looks like a real bug. Unfortunately we are retrying the upload after we've partially consumed the input which is what is causing the corruptions. It is a very easy fix though - please try this
v1.76.0-beta.10097.2e78d8f7f.fix-9722-protondrive-upload-retry on branch fix-9722-protondrive-upload-retry (uploaded in 15-30 mins)
skellycode commentedon Aug 3, 2026
Thank you, @ncw!
It appears have to solved this issue. The retry appears to have happened successfully, and the prune/check step now passes after a retry (rather than failing previously). Please check these logs to confirm, and close the issue if all looks ok from your end 😄
skellycode commentedon Aug 4, 2026
Confirming that I've since done a full
--checkdataon the repository and it's come back clean.Issue solved - thanks for the quick fix!
operations: fix silent truncation of streaming uploads whose source e…
protondrive: fix corrupted uploads after a retried upload error - fixes
ncw commentedon Aug 4, 2026
Thanks for testing @skellycode
Your log shows restic doing the retries which is what we want to see.
I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.74.1
operations: fix silent truncation of streaming uploads whose source e…
protondrive: fix corrupted uploads after a retried upload error - fixes
operations: fix silent truncation of streaming uploads whose source e…
protondrive: fix corrupted uploads after a retried upload error - fixes