Skip to content

[ProtonDrive] 1.75.0 appears to cause issues with the 422->404 sequence when using restic #9722

Closed

Description

@skellycode

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 = XXX

The 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

  1. ncw commented on Aug 3, 2026

    @ncw
    Member

    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)

  2. skellycode commented on Aug 3, 2026

    @skellycode
    Author

    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 😄

    === Tue Aug  4 07:31:22: Running job 'Filing' ===
    === Tue Aug  4 07:31:22: Starting backup 'Filing' of /mnt/tank/Filing to rclone:protondrive:restic/Filing ===
    2026-08-04 07:32:19 - progress: 47.5% | files 6973/7165 | data 8.9 GiB/18.7 GiB
    <...>
    2026-08-04 07:39:20 - progress: 12.1% | files 6975/30379 | data 9.4 GiB/77.7 GiB
    rclone: 2026/08/04 07:39:42 NOTICE: proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": write tcp 10.30.0.2:50388->185.205.70.10:443: use of closed network connection, Attempt 1
    rclone: 2026/08/04 07:39:48 NOTICE: proton drive root link ID 'restic/Filing': 400 POST https://fra-storage.proton.me/storage/blocks: Upload file empty (Code=2003, Status=400), Attempt 2
    rclone: 2026/08/04 07:39:48 ERROR : proton drive root link ID 'restic/Filing': 400 POST https://fra-storage.proton.me/storage/blocks: Upload file empty (Code=2003, Status=400)
    rclone: 2026/08/04 07:39:48 ERROR : data/5e/5ecde59349f63427a86a3fc08494e6f3638c077ffd30769ba710ec4052827c21: Post request put error: 400 POST https://fra-storage.proton.me/storage/blocks: Upload file empty (Code=2003, Status=400)
    rclone: 2026/08/04 07:39:48 ERROR : data/5e/5ecde59349f63427a86a3fc08494e6f3638c077ffd30769ba710ec4052827c21: Post request rcat error: 400 POST https://fra-storage.proton.me/storage/blocks: Upload file empty (Code=2003, Status=400)
    rclone: 2026/08/04 07:39:48 NOTICE: proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled, Attempt 1
    rclone: 2026/08/04 07:39:48 ERROR : proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled
    rclone: 2026/08/04 07:39:48 NOTICE: proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled, Attempt 1
    rclone: 2026/08/04 07:39:48 ERROR : proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled
    rclone: 2026/08/04 07:39:48 NOTICE: proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled, Attempt 1
    rclone: 2026/08/04 07:39:48 ERROR : proton drive root link ID 'restic/Filing': Post "https://fra-storage.proton.me/storage/blocks": context canceled
    2026-08-04 07:39:50 - progress: 12.1% | files 6975/30379 | data 9.4 GiB/77.7 GiB
    Save(<data/5ecde59349>) returned error, retrying after 974.405753ms: unexpected HTTP response (500): 500 Internal Server Error
    rclone: 2026/08/04 07:39:53 NOTICE: proton drive root link ID 'restic/Filing': 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/04 07:39:53 ERROR : proton drive root link ID 'restic/Filing': 422 POST https://drive-api.proton.me/drive/shares/REDACTED/files: A file or folder with that name already exists (Code=2500, Status=422)
    2026-08-04 07:40:20 - progress: 12.1% | files 6975/30379 | data 9.4 GiB/77.7 GiB
    2026-08-04 07:40:50 - progress: 12.1% | files 6975/30379 | data 9.4 GiB/77.7 GiB
    2026-08-04 07:41:20 - progress: 12.2% | files 6975/30379 | data 9.5 GiB/77.7 GiB
    2026-08-04 07:41:50 - progress: 12.4% | files 6975/30379 | data 9.7 GiB/77.7 GiB
    2026-08-04 07:42:20 - progress: 12.4% | files 6975/30379 | data 9.7 GiB/77.7 GiB
    2026-08-04 07:42:50 - progress: 12.5% | files 6975/30379 | data 9.7 GiB/77.7 GiB
    2026-08-04 07:43:20 - progress: 12.5% | files 6975/30379 | data 9.7 GiB/77.7 GiB
    2026-08-04 07:43:50 - progress: 12.8% | files 6975/30379 | data 9.9 GiB/77.7 GiB
    2026-08-04 07:44:20 - progress: 12.8% | files 6975/30379 | data 9.9 GiB/77.7 GiB
    2026-08-04 07:44:50 - progress: 12.8% | files 6975/30379 | data 9.9 GiB/77.7 GiB
    2026-08-04 07:45:20 - progress: 12.8% | files 6975/30379 | data 9.9 GiB/77.7 GiB
    2026-08-04 07:45:50 - progress: 12.8% | files 6975/30379 | data 9.9 GiB/77.7 GiB
    Save(<data/5ecde59349>) operation successful after 1 retries
    2026-08-04 07:46:20 - progress: 13.1% | files 6975/30379 | data 10.2 GiB/77.7 GiB
    2026-08-04 07:46:50 - progress: 13.1% | files 6975/30379 | data 10.2 GiB/77.7 GiB
    <...>
    2026-08-04 08:05:51 - progress: 100% | files 30379/30379 | data 77.7 GiB/77.7 GiB
    2026-08-04 08:06:09 - summary: snapshot edff48b53598f77e5fbebf985d1750e64bf65bc9ce05ba5c4fa252758c2b83ef | 77 new, 5 changed, 30297 unchanged | processed 77.7 GiB in 2084.286246837s
    === Tue Aug  4 08:06:10: Forgetting old snapshots for 'Filing' ===
    Applying Policy: keep 7 daily, 4 weekly, 6 monthly snapshots
    keep 3 snapshots:
    ID        Time                 Host        Tags        Reasons                  Paths             Size
    ------------------------------------------------------------------------------------------------------------
    16970abb  2026-07-06 15:38:43  truenas                 daily snapshot           /mnt/tank/Filing  73.614 GiB
                                                           weekly snapshot
                                                           oldest monthly snapshot
    3dad1c54  2026-07-13 18:13:24  truenas                 daily snapshot           /mnt/tank/Filing  73.655 GiB
                                                           weekly snapshot
                                                           monthly snapshot
    edff48b5  2026-08-04 07:31:22  truenas                 daily snapshot           /mnt/tank/Filing  77.739 GiB
                                                           weekly snapshot
                                                           monthly snapshot
    ------------------------------------------------------------------------------------------------------------
    3 snapshots
    
    === Tue Aug  4 08:06:41 : Pruning repository for 'Filing' ===
    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
    [5:53] 100.00%  532 / 532 packs processed
    
    to repack:             0 blobs / 0 B
    this removes:          0 blobs / 0 B
    to delete:             0 blobs / 0 B
    total prune:           0 blobs / 0 B
    remaining:         87268 blobs / 66.439 GiB
    unused size after prune: 0 B (0.00% of remaining size)
    
    done
    === Tue Aug  4 08:13:09: Running repository check for 'Filing' ===
    using temporary cache in /tmp/restic-check-cache-1447772514
    create exclusive lock for repository
    load indexes
    check all packs
    check snapshots, trees and blobs
    [0:16] 100.00%  3 / 3 snapshots
    no errors were found
    === Tue Aug  4 08:21:16: Backup 'Filing' completed successfully ===
    
  3. skellycode commented on Aug 4, 2026

    @skellycode
    Author

    Confirming that I've since done a full --checkdata on the repository and it's come back clean.
    Issue solved - thanks for the quick fix!

  4. ncw commented on Aug 4, 2026

    @ncw
    Member

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions