Can't upload large files to Proton?

What is the problem you are having with rclone?

I get errors when attempting to upload a large file with the copyto command to Proton Drive.

I tried a variety of files of different sizes, and the limit appears to be somewhere between 146MB and 778MB. Every file below that line worked, and every file above that line failed with strange errors.

Run the command 'rclone version' and share the full output of the command.

rclone v1.69.0
- os/version: ubuntu 24.10 (64 bit)
- os/kernel: 6.11.0-14-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.4
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Proton Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copyto ~/test.mp4 proton:folder1/test.mp4

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive = 

[proton]
type = protondrive
username = XXX
password = XXX
client_uid = XXX
client_access_token = XXX
client_refresh_token = XXX
client_salted_key_pass = XXX

A log from the command that you were trying to run with the -vv flag

Example of a file that is too large. (778MB)

$ rclone -vv copyto ~/test.mp4 proton:folder1/test.mp4
2025/02/02 18:42:00 DEBUG : rclone: Version "v1.69.0" starting with parameters ["rclone" "-vv" "copyto" "/home/ofer/test.mp4" "proton:folder1/test.mp4"]
2025/02/02 18:42:00 DEBUG : Creating backend with remote "/home/ofer/test.mp4"
2025/02/02 18:42:00 DEBUG : Using config file from "/home/ofer/.config/rclone/rclone.conf"
2025/02/02 18:42:00 DEBUG : fs cache: renaming child cache item "/home/ofer/test.mp4" to be canonical for parent "/home/ofer"
2025/02/02 18:42:00 DEBUG : Creating backend with remote "proton:folder1/"
2025/02/02 18:42:00 DEBUG : proton drive root link ID 'folder1': Has cached credentials
2025/02/02 18:42:03 DEBUG : proton drive root link ID 'folder1': Used cached credential to initialize the ProtonDrive API
2025/02/02 18:42:04 DEBUG : fs cache: renaming cache item "proton:folder1/" to be canonical "proton:folder1"
2025/02/02 18:42:05 DEBUG : test.mp4: Need to transfer - File not found at Destination
2025/02/02 18:42:26.402112 WARN RESTY Post "https://zrh-storage.proton.me/storage/blocks": write tcp 10.0.0.42:38286->176.119.200.8:443: use of closed network connection, Attempt 1
2025/02/02 18:42:27.190134 WARN RESTY 400 POST https://zrh-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400), Attempt 2
2025/02/02 18:42:27.190153 ERROR RESTY 400 POST https://zrh-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 18:42:27 ERROR : test.mp4: Failed to copy: 400 POST https://zrh-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 18:42:27 ERROR : Attempt 1/3 failed with 1 errors and: 400 POST https://zrh-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 18:42:28 DEBUG : test.mp4: Need to transfer - File not found at Destination
2025/02/02 18:42:29.135524 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2025/02/02 18:42:29.135543 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2025/02/02 18:42:30 ERROR : test.mp4: Failed to copy: a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt. Can use --protondrive-replace-existing-draft=true to temporarily override the existing draft
2025/02/02 18:42:30 ERROR : Attempt 2/3 failed with 1 errors and: a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt. Can use --protondrive-replace-existing-draft=true to temporarily override the existing draft
2025/02/02 18:42:31 DEBUG : test.mp4: Need to transfer - File not found at Destination
2025/02/02 18:42:33.148718 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2025/02/02 18:42:33.148734 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2025/02/02 18:42:35 ERROR : test.mp4: Failed to copy: a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt. Can use --protondrive-replace-existing-draft=true to temporarily override the existing draft
2025/02/02 18:42:35 ERROR : Attempt 3/3 failed with 1 errors and: a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt. Can use --protondrive-replace-existing-draft=true to temporarily override the existing draft
2025/02/02 18:42:35 INFO  : 
Transferred:   	       64 MiB / 64 MiB, 100%, 1.729 MiB/s, ETA 0s
Errors:                 1 (retrying may help)
Elapsed time:        29.7s

2025/02/02 18:42:35 DEBUG : 25 go routines active
2025/02/02 18:42:35 NOTICE: Failed to copyto: a draft exist - usually this means a file is being uploaded at another client, or, there was a failed upload attempt. Can use --protondrive-replace-existing-draft=true to temporarily override the existing draft

A log from the command that you were trying to run with the -vv flag

Example of a file that is NOT too large. (146MB)

$ rclone -vv copyto ~/test.csv proton:folder1/test.csv
2025/02/02 18:44:31 DEBUG : rclone: Version "v1.69.0" starting with parameters ["rclone" "-vv" "copyto" "/home/ofer/test.csv" "proton:folder1/test.csv"]
2025/02/02 18:44:31 DEBUG : Creating backend with remote "/home/ofer/test.csv"
2025/02/02 18:44:31 DEBUG : Using config file from "/home/ofer/.config/rclone/rclone.conf"
2025/02/02 18:44:31 DEBUG : fs cache: renaming child cache item "/home/ofer/test.csv" to be canonical for parent "/home/ofer"
2025/02/02 18:44:31 DEBUG : Creating backend with remote "proton:folder1/"
2025/02/02 18:44:31 DEBUG : proton drive root link ID 'folder1': Has cached credentials
2025/02/02 18:44:33 DEBUG : proton drive root link ID 'folder1': Used cached credential to initialize the ProtonDrive API
2025/02/02 18:44:34 DEBUG : fs cache: renaming cache item "proton:folder1/" to be canonical "proton:folder1"
2025/02/02 18:44:35 DEBUG : test.csv: Need to transfer - File not found at Destination
2025/02/02 18:45:34 INFO  : 
Transferred:   	       96 MiB / 145.400 MiB, 66%, 859.022 KiB/s, ETA 58s
Transferred:            0 / 1, 0%
Elapsed time:        59.4s
Transferring:
 *                                      test.csv: 66% /145.400Mi, 859.011Ki/s, 58s

2025/02/02 18:46:05 DEBUG : test.csv: sha1 = 18036cf4c0089ba7f68d9bf54b5c82674b1526d3 OK
2025/02/02 18:46:05 INFO  : test.csv: Copied (new)
2025/02/02 18:46:05 INFO  : 
Transferred:   	  145.400 MiB / 145.400 MiB, 100%, 1015.332 KiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:      1m30.5s

2025/02/02 18:46:05 DEBUG : 9 go routines active

FYI:

$ ls -lh ~/
...
-rw-rw-r--  1 ofer ofer 146M Feb  2 18:41 test.csv
-rw-rw-r--  1 ofer ofer 778M Feb  2 18:40 test.mp4
...

welcome to the forum,

did you see that?

I saw that error, but I assume it is wrong. The rclone command itself states this on line 9 of the output:

test.mp4: Need to transfer - File not found at Destination

Also, I specifically changed the source and destination filename with every test I ran to ensure that there was never a possibility of an existing file complicating the action.

not sure exactly why you keep seeing that error on a new, never previously uploaded file, but rclone was clear about that to try, so why not try it?
afiak, the fact that the file does not exist in the dest, it not relevant to the error message.


did you read the docs?
When a file upload is cancelled or failed before completion, a draft will be created and the subsequent upload of the same file to the same location will be reported as a conflict.


can you post the output of rclone about proton:

Here's the output of rclone about proton::

Total:   510 GiB
Used:    2.368 GiB
Free:    507.632 GiB

As for the --protondrive-replace-existing-draft=true flag, I added it and ran the test again. It's still running, but I've seen enough output to conclude that the process has gone off the rails and should probably be killed.

$ rclone -vv --protondrive-replace-existing-draft=true copyto test1.mp4 proton:folder2/test1.mp4
2025/02/02 19:56:44 DEBUG : rclone: Version "v1.69.0" starting with parameters ["rclone" "-vv" "--protondrive-replace-existing-draft=true" "copyto" "test1.mp4" "proton:folder2/test1.mp4"]
2025/02/02 19:56:44 DEBUG : Creating backend with remote "test1.mp4"
2025/02/02 19:56:44 DEBUG : Using config file from "/home/ofer/.config/rclone/rclone.conf"
2025/02/02 19:56:44 DEBUG : fs cache: renaming child cache item "test1.mp4" to be canonical for parent "/home/ofer"
2025/02/02 19:56:44 DEBUG : Creating backend with remote "proton:folder2/"
2025/02/02 19:56:44 DEBUG : proton: detected overridden config - adding "{kpshc}" suffix to name
2025/02/02 19:56:44 DEBUG : proton drive root link ID 'folder2': Has cached credentials
2025/02/02 19:56:47 DEBUG : proton drive root link ID 'folder2': Used cached credential to initialize the ProtonDrive API
2025/02/02 19:56:48 DEBUG : fs cache: renaming cache item "proton:folder2/" to be canonical "proton{kpshc}:folder2"
2025/02/02 19:56:49 DEBUG : test1.mp4: Need to transfer - File not found at Destination
2025/02/02 19:57:48 INFO  : 
Transferred:   	       64 MiB / 777.914 MiB, 8%, 463.816 KiB/s, ETA 26m16s
Transferred:            0 / 1, 0%
Elapsed time:        59.3s
Transferring:
 *                                     test1.mp4:  8% /777.914Mi, 463.812Ki/s, 26m16s

2025/02/02 19:58:48 INFO  : 
Transferred:   	      160 MiB / 777.914 MiB, 21%, 943.841 KiB/s, ETA 11m10s
Transferred:            0 / 1, 0%
Elapsed time:      1m59.3s
Transferring:
 *                                     test1.mp4: 20% /777.914Mi, 943.841Ki/s, 11m10s

2025/02/02 19:59:48 INFO  : 
Transferred:   	      224 MiB / 777.914 MiB, 29%, 1.031 MiB/s, ETA 8m57s
Transferred:            0 / 1, 0%
Elapsed time:      2m59.3s
Transferring:
 *                                     test1.mp4: 28% /777.914Mi, 1.031Mi/s, 8m57s

2025/02/02 20:00:48 INFO  : 
Transferred:   	      288 MiB / 777.914 MiB, 37%, 2.102 MiB/s, ETA 3m53s
Transferred:            0 / 1, 0%
Elapsed time:      3m59.3s
Transferring:
 *                                     test1.mp4: 37% /777.914Mi, 2.102Mi/s, 3m53s

2025/02/02 20:01:48 INFO  : 
Transferred:   	      320 MiB / 777.914 MiB, 41%, 988.828 KiB/s, ETA 7m54s
Transferred:            0 / 1, 0%
Elapsed time:      4m59.3s
Transferring:
 *                                     test1.mp4: 41% /777.914Mi, 988.831Ki/s, 7m54s

2025/02/02 20:02:48 INFO  : 
Transferred:   	      352 MiB / 777.914 MiB, 45%, 484.739 KiB/s, ETA 14m59s
Transferred:            0 / 1, 0%
Elapsed time:      5m59.3s
Transferring:
 *                                     test1.mp4: 45% /777.914Mi, 484.739Ki/s, 14m59s

2025/02/02 20:03:48 INFO  : 
Transferred:   	      416 MiB / 777.914 MiB, 53%, 1.408 MiB/s, ETA 4m17s
Transferred:            0 / 1, 0%
Elapsed time:      6m59.3s
Transferring:
 *                                     test1.mp4: 53% /777.914Mi, 1.408Mi/s, 4m17s

2025/02/02 20:04:37.983885 WARN RESTY Post "https://fra-storage.proton.me/storage/blocks": write tcp 10.0.0.42:55930->185.205.70.10:443: use of closed network connection, Attempt 1
2025/02/02 20:04:43.798756 WARN RESTY 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400), Attempt 2
2025/02/02 20:04:43.798774 ERROR RESTY 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:04:43 ERROR : test1.mp4: Failed to copy: 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:04:43 ERROR : Attempt 1/3 failed with 1 errors and: 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:04:44 DEBUG : test1.mp4: Need to transfer - File not found at Destination
2025/02/02 20:04:45.842940 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2025/02/02 20:04:45.842966 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2025/02/02 20:04:48 INFO  : 
Transferred:   	      448 MiB / 1.197 GiB, 37%, 1.078 MiB/s, ETA 12m1s
Transferred:            0 / 1, 0%
Elapsed time:      7m59.3s
Transferring:
 *                                     test1.mp4:  0% /777.914Mi, 0/s, -

2025/02/02 20:05:20.554001 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:20.554027 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:21.042394 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:21.042412 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:22.833139 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:22.833168 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:26.437524 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:26.437552 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:28.384293 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:28.384308 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:29.603505 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:29.603536 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:31.376381 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:05:31.376418 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:05:48 INFO  : 
Transferred:   	      480 MiB / 1.197 GiB, 39%, 96.593 KiB/s, ETA 2h11m47s
Transferred:            0 / 1, 0%
Elapsed time:      8m59.3s
Transferring:
 *                                     test1.mp4:  4% /777.914Mi, 98.623Ki/s, 2h9m4s

2025/02/02 20:06:48 INFO  : 
Transferred:   	      512 MiB / 1.197 GiB, 42%, 96.593 KiB/s, ETA 2h6m8s
Transferred:            0 / 1, 0%
Elapsed time:      9m59.3s
Transferring:
 *                                     test1.mp4:  8% /777.914Mi, 48.649Ki/s, 4h10m26s

2025/02/02 20:07:48 INFO  : 
Transferred:   	      544 MiB / 1.197 GiB, 44%, 96.593 KiB/s, ETA 2h29s
Transferred:            0 / 1, 0%
Elapsed time:     10m59.3s
Transferring:
 *                                     test1.mp4: 12% /777.914Mi, 93.472Ki/s, 2h4m30s

2025/02/02 20:08:48 INFO  : 
Transferred:   	      608 MiB / 1.197 GiB, 50%, 96.593 KiB/s, ETA 1h49m10s
Transferred:            0 / 1, 0%
Elapsed time:     11m59.3s
Transferring:
 *                                     test1.mp4: 20% /777.914Mi, 1.185Mi/s, 8m41s

2025/02/02 20:09:48 INFO  : 
Transferred:   	      640 MiB / 1.197 GiB, 52%, 96.593 KiB/s, ETA 1h43m31s
Transferred:            0 / 1, 0%
Elapsed time:     12m59.3s
Transferring:
 *                                     test1.mp4: 24% /777.914Mi, 588.576Ki/s, 16m59s

2025/02/02 20:10:48 INFO  : 
Transferred:   	      672 MiB / 1.197 GiB, 55%, 96.593 KiB/s, ETA 1h37m52s
Transferred:            0 / 1, 0%
Elapsed time:     13m59.3s
Transferring:
 *                                     test1.mp4: 28% /777.914Mi, 956.276Ki/s, 9m53s

2025/02/02 20:11:13.858321 WARN RESTY Post "https://fra-storage.proton.me/storage/blocks": write tcp 10.0.0.42:40220->185.205.70.10:443: write: connection reset by peer, Attempt 1
2025/02/02 20:11:14.538326 WARN RESTY 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400), Attempt 2
2025/02/02 20:11:14.538342 ERROR RESTY 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:11:14 ERROR : test1.mp4: Failed to copy: 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:11:14 ERROR : Attempt 2/3 failed with 1 errors and: 400 POST https://fra-storage.proton.me/storage/blocks: Invalid content length (Code=2022, Status=400)
2025/02/02 20:11:15 DEBUG : test1.mp4: Need to transfer - File not found at Destination
2025/02/02 20:11:16.676048 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2025/02/02 20:11:16.676102 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/Onfwuv4UNCR1FEbY1WZgYCv8r1u9tDWyUjTv6cw2z47hdJg85dDaKDVE-9als-ZB5p1cYckKb1KiTDornkJxVw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2025/02/02 20:11:28.461183 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:28.461205 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:31.073241 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:31.073263 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:31.438892 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:31.438910 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:32.243566 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:32.243586 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:32.790327 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:32.790349 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:32.872040 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:32.872066 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:34.589901 WARN RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404), Attempt 1
2025/02/02 20:11:34.589920 ERROR RESTY 404 POST https://fra-storage.proton.me/storage/blocks: Invalid token (Code=2501, Status=404)
2025/02/02 20:11:48 INFO  : 
Transferred:   	      768 MiB / 1.447 GiB, 52%, 96.593 KiB/s, ETA 2h6m8s
Transferred:            0 / 1, 0%
Elapsed time:     14m59.3s
Transferring:
 *                                     test1.mp4:  8% /777.914Mi, 2.161Mi/s, 5m30s

2025/02/02 20:12:48 INFO  : 
Transferred:   	      832 MiB / 1.447 GiB, 56%, 96.593 KiB/s, ETA 1h54m49s
Transferred:            0 / 1, 0%
Elapsed time:     15m59.3s
Transferring:
 *                                     test1.mp4: 16% /777.914Mi, 1.663Mi/s, 6m30s

2025/02/02 20:13:48 INFO  : 
Transferred:   	      832 MiB / 1.447 GiB, 56%, 96.593 KiB/s, ETA 1h54m49s
Transferred:            0 / 1, 0%
Elapsed time:     16m59.3s
Transferring:
 *                                     test1.mp4: 16% /777.914Mi, 35.428Ki/s, 5h13m4s

2025/02/02 20:14:48 INFO  : 
Transferred:   	      864 MiB / 1.447 GiB, 58%, 96.593 KiB/s, ETA 1h49m10s
Transferred:            0 / 1, 0%
Elapsed time:     17m59.3s
Transferring:
 *                                     test1.mp4: 20% /777.914Mi, 408.692Ki/s, 25m48s

2025/02/02 20:15:48 INFO  : 
Transferred:   	      864 MiB / 1.447 GiB, 58%, 96.593 KiB/s, ETA 1h49m10s
Transferred:            0 / 1, 0%
Elapsed time:     18m59.3s
Transferring:
 *                                     test1.mp4: 20% /777.914Mi, 8.505Ki/s, 20h39m56s

2025/02/02 20:16:48 INFO  : 
Transferred:   	      896 MiB / 1.447 GiB, 60%, 96.593 KiB/s, ETA 1h43m31s
Transferred:            0 / 1, 0%
Elapsed time:     19m59.3s
Transferring:
 *                                     test1.mp4: 24% /777.914Mi, 295.615Ki/s, 33m49s

2025/02/02 20:17:48 INFO  : 
Transferred:   	      928 MiB / 1.447 GiB, 63%, 96.593 KiB/s, ETA 1h37m52s
Transferred:            0 / 1, 0%
Elapsed time:     20m59.3s
Transferring:
 *                                     test1.mp4: 28% /777.914Mi, 647.086Ki/s, 14m36s

2025/02/02 20:18:48 INFO  : 
Transferred:   	      928 MiB / 1.447 GiB, 63%, 96.593 KiB/s, ETA 1h37m52s
Transferred:            0 / 1, 0%
Elapsed time:     21m59.3s
Transferring:
 *                                     test1.mp4: 28% /777.914Mi, 13.466Ki/s, 11h42m1s

2025/02/02 20:19:48 INFO  : 
Transferred:   	      960 MiB / 1.447 GiB, 65%, 96.593 KiB/s, ETA 1h32m12s
Transferred:            0 / 1, 0%
Elapsed time:     22m59.3s
Transferring:
 *                                     test1.mp4: 32% /777.914Mi, 76.464Ki/s, 1h56m29s

2025/02/02 20:20:48 INFO  : 
Transferred:   	      992 MiB / 1.447 GiB, 67%, 96.593 KiB/s, ETA 1h26m33s
Transferred:            0 / 1, 0%
Elapsed time:     23m59.3s
Transferring:
 *                                     test1.mp4: 37% /777.914Mi, 901.372Ki/s, 9m16s

2025/02/02 20:21:48 INFO  : 
Transferred:   	      992 MiB / 1.447 GiB, 67%, 96.593 KiB/s, ETA 1h26m33s
Transferred:            0 / 1, 0%
Elapsed time:     24m59.3s
Transferring:
 *                                     test1.mp4: 37% /777.914Mi, 18.757Ki/s, 7h25m44s

2025/02/02 20:22:48 INFO  : 
Transferred:   	        1 GiB / 1.447 GiB, 69%, 96.593 KiB/s, ETA 1h20m54s
Transferred:            0 / 1, 0%
Elapsed time:     25m59.3s
Transferring:
 *                                     test1.mp4: 41% /777.914Mi, 1.194Mi/s, 6m23s

2025/02/02 20:23:48 INFO  : 
Transferred:   	        1 GiB / 1.447 GiB, 69%, 96.593 KiB/s, ETA 1h20m54s
Transferred:            0 / 1, 0%
Elapsed time:     26m59.3s
Transferring:
 *                                     test1.mp4: 41% /777.914Mi, 25.439Ki/s, 5h7m11s

2025/02/02 20:24:48 INFO  : 
Transferred:   	        1 GiB / 1.447 GiB, 69%, 96.593 KiB/s, ETA 1h20m54s
Transferred:            0 / 1, 0%
Elapsed time:     27m59.3s
Transferring:
 *                                     test1.mp4: 41% /777.914Mi, 542/s, 246h1m50s

2025/02/02 20:25:48 INFO  : 
Transferred:   	    1.031 GiB / 1.447 GiB, 71%, 96.593 KiB/s, ETA 1h15m15s
Transferred:            0 / 1, 0%
Elapsed time:     28m59.3s
Transferring:
 *                                     test1.mp4: 45% /777.914Mi, 98.634Ki/s, 1h13m41s

much discussed in the forum, that rclone's support for proton has stalled, maybe abandoned, has old bugs not getting fixed and the author of the rclone's proton backend has not visited the forum in over a year, and did not respond to a request from ncw.

it is clear from forum posts and proton tech support, that proton refuses to support rclone.

Is it worth continuing to offer a proton drive backend when the the vendor is so hostile? It looks like RC can never offer a reliable backand whilst it is reversed engineered and the API is prone to change? As I understand it users are going to get their wrists slapped for connecting with RC.

Having just set up a Proton backend for the first time (which seems to be working OK, including for files way larger than those the OP was having problems with, albeit in very limited usage so far), I am curious about this hostility and predicted wrist-slapping. Could you please elaborate on what you mean? Thanks.

As @asdffdsa says, look in the forums and elsewhere. I last coded in the VB days so I am poorly qualified to speak but hey, never let that stop you. It's today's style. At the present time Proton do not publish their drive API so any Linux client has to be reverse engineered. This will inevitably result in errors because no matter how good the coder is, APIs change and if the coder misunderstands the API and its properties they have no documentation to refer to in order to attempt a fix. These errors result in alerts on Proton's systems triggering and users being asked not to try and connect with RC. The "slapped wrists". I found a couple of cases on Reddit. I don't know widespread it is because not everyone will tell Reddit or this forum about it.

Proton have open-sourced their Win and Mac clients from which someone might be able to work the API out but again they have to trawl through the code to deal with changes. They may have published an SDK for drive but I don't know if that is any help to an RC backend developer. Their blogs indicate a low priority for a Linux drive client because they have higher priorities for their Linux developers.

But we have RC now. It works and we rely on it. Much the easiest thing is for the API to be published so someone can develop a documented and supported backend. RC are not in that position. Personally, I wouldn't use the current Protondrive backend because if I had problems Proton won't assist me and the RC team can't for reasons beyond their control.

This is all I think and possibly know. The old canard about vendors talking about how much they love FOSS but not extending that love to desktop Linux support is as old as the hills and probably for another channel in this forum.

Thanks. I dunno, though, I looked at the Reddit forums a little, and while I did find some people who are pissed off, including some who got temporarily shut off, I also found some indication that:

(A) the shutoffs have been due to interaction between stuff like their "that's a lot of logins (or whatever)" checks -- which apparently were not designed with rclone in mind -- and the fact that a lot of rclone users do things like "sync the universe every five minutes", and

(B) they intend to work on making things work better for rclone users, and in the meantime ask that we don't sync the universe every five minutes.

Obviously that's suboptimal, but it sounds reasonable, even if no externally visible progress has been made. At the very least I think it's quite a leap from there to "so hostile". And like I say, it's working for me (though it is slow).

@rwv37 If is works for you then that's great. You may be right that Proton are not hostile but it sounds like passive-agression on Proton's part to me. I do use Proton occasionally but not for cloud storage. They might be "making things better for RC" but not saying how. They can't realistically do this with an out of date and unmaintained backend and no published API to work to. The infractions you describe may only possible because the backend cannot have parameters with values which are acceptable Proton because a maintainer may have no idea what they are. I don't see anything on the Proton web which says "you can't do this or that". They appear to me to be blaming the user after the fact. Proton do not publicly say "we do not support RC and our API cannot work with RC in a way we can accept so don't use it". It comes in dribbles through support messages. They are a commercial operation and that's their prerogative. Cue howls of protest from a relatively small number of Linux drive users. They don't want the hassle. RC is one of the premier collaborative FOSS projects. S3 compatible clouds are far from identical in their implementations and so without public API's and recommended parameters from the vendors most of vendor specific backends would not work very well. They usually do and that's because....

That's all I have to say.

1 Like

Proton remote in rclone as it is now is not really for any production use. There is nobody working on it. So unfortunately all bugs reports do not have any purpose.

Hopefully somebody at some stage decides to change it. But until then it should be considered mothballed.

Problem is @kapitainsky is that the backend page says

Blockquote Proton Drive is an end-to-end encrypted Swiss vault for your files that protects your data.
This is an rclone backend for Proton Drive which supports the file transfer features of Proton Drive using the same client-side encryption.
Due to the fact that Proton Drive doesn't publish its API documentation, this backend is implemented with best efforts by reading the open-sourced client source code and observing the Proton Drive traffic in the browser.
NB This backend is currently in Beta. It is believed to be correct and all the integration tests pass. However the Proton Drive protocol has evolved over time there may be accounts it is not compatible with. Please post on the rclone forum if you find an incompatibility.
Paths are specified as remote:path
Paths may be as deep as required, e.g. remote:directory/subdirectory.

Does not look strictly accurate to me, so whilst it's there It seems to me you are going to have ongoing support questions about it.

OK, I've been fooling around with this for a while now, so for the benefit of anyone who may find this thread in the future, here's a summary of what I've found.

SUMMARY

(1) It seems to work fine, as long as you're patient and willing to keep trying (see (4) below for more info).

(2) "It" in the above (and elsewhere) means my use case, which is not necessarily exactly your use case. I have not tried your use. Uh... unless your use case is exactly my use case.

(3) My use case:

(3A) I'm uploading from a local drive to the cloud.

(3B) I always use rclone copy, not (e.g.) rclone sync, because I pretty much never want to get rid of files that I've previously uploaded. In the rare cases where I need them gone from the remote, I remove them manually. That's a minor hassle, I guess, but I almost never have to do it, and I'd rather do it manually once in a while than trusting myself not to ever screw up the sync by, say, typing in the wrong local path or whatever.

(3C) That's true in general, but also, for Proton specifically, I'm only uploading things that also should never be altered, let alone deleted.

(4) Although it seems to work fine, it is verrrrrrrrrrrrrrrrrry slow, and is prone to transient errors like disconnects that can be resolved simply by trying again. I've come up with various mitigations for these issues, which (in my case, at least) speed things up greatly. I'll describe what I do below.

GENERAL OVERVIEW OF WHAT I DO

(1) I generate a list of all local files that I want to be on the remote (regardless of whether or not they already are on the remote). Note that since I'm just searching my local machine in this step, it's very fast, and Proton's extreme slowness is not relevant.

(2) I compare that list of files to a list of files that I already know are on the remote and already know have the correct checksum and whatnot.

(3) Any file that is on the first list but not on the second is one that may not be on the remote, or may not be there correctly. Note that it may be there, and in fact may be there correctly; I just don't know yet. So, I rclone check those files on the remote specifically, and only those files (as I desperately want to minimize interaction with Proton).

(4) I split the results of the check into two parts: Files that I now know are good, and files that I still do not know are good (perhaps I now explicitly know they're bad, but I don't really care about such distinctons; "known to be good" and "not known to be good" is good enough).

(5) I update the list of files that I know to be good by combining those I found in step (2) with those I found in step (4).

(6) I calculate the list of things that I want to try to upload. This is done basically in the same way I calculated the list of things that I wanted to check (earlier, in (2) and (3)).

(7) I try uploading them.

(8) Rinse and repeat until nothing needs to be uploaded.

WARNING: I AM A DUMBASS

I will give example scripts for all of that momentarily. However:

(1) I want to reiterate that my use case may not be your use case.

(2) The scripts are very quick-and-dirty; for example, they do almost no error checking. My opinion is that you would be unwise to use them exactly as is, but I hope they might at least be good to give you some idea of how to do it.

(3) Even ignoring (2), I am a dumbass. Plus, I hate bash (for scripting - for command line stuff, I like it just fine), and that's the language I wrote them in. For both of these reasons, I'd like to reiterate that my opinion is that you would be unwise to use them exactly as is.

(4) There are at least two FreeBSDismss (or at least not-necessarly-built-in-Linuxisms) in the scripts, so if you're using Linux or whatever, you may have to make some little adjustments. There may be others too, but here are the two that immediately come to my mind:

(4A) I am using #!/usr/local/bin/bash as the shebang. I believe that bash is typically in a different location in Linux.

(4B) I'm using gfind, i.e. GNU's find, which is different than the standard FreeBSD find. I think that GNU's find is the default find on Linux (so you could just change gfind to find).

MY SCRIPTS (I REPEAT: I AM A DUMBASS)

Here are the scripts. The first is not really meant to be run as a script; it's sourced in by all the others. It mostly just sets up some variables. The only other thing it does is create a timestamped archived copy of the current state of the "out" directory.

lib/warreng.bash

# This script is to be sourced in (e.g. ". blah") rather than to be run
# (e.g. "./blah").

# Note that this set of scripts is EXTREMELY quick-and-dirty. For example,
# it relies upon...
set -e

RWV37_PROTONSTUFF_START_TIMESTAMP=$(date -Ins)
sleep 0.01

RWV37_PROTONSTUFF_RCLONE_LOCAL="/stuff/restic"
RWV37_PROTONSTUFF_RCLONE_REMOTE="Proton:Restic"
RWV37_PROTONSTUFF_RCLONE_SUB="Audio"
RWV37_PROTONSTUFF_RCLONE_LOCAL_WITH_SUB="${RWV37_PROTONSTUFF_RCLONE_LOCAL}/${RWV37_PROTONSTUFF_RCLONE_SUB}"
RWV37_PROTONSTUFF_RCLONE_REMOTE_WITH_SUB="${RWV37_PROTONSTUFF_RCLONE_REMOTE}/${RWV37_PROTONSTUFF_RCLONE_SUB}"

RWV37_PROTONSTUFF_DIR="/root/bobtmpprotonchk"

RWV37_PROTONSTUFF_DIR_ARCHIVE="${RWV37_PROTONSTUFF_DIR}/archive"
RWV37_PROTONSTUFF_DIR_BIN="${RWV37_PROTONSTUFF_DIR}/bin"
RWV37_PROTONSTUFF_DIR_LIB="${RWV37_PROTONSTUFF_DIR}/lib"
RWV37_PROTONSTUFF_DIR_OUT="${RWV37_PROTONSTUFF_DIR}/out"

RWV37_PROTONSTUFF_DIR_TIMESTAMPED_ARCHIVE="${RWV37_PROTONSTUFF_DIR_ARCHIVE}/${RWV37_PROTONSTUFF_START_TIMESTAMP}"       
RWV37_PROTONSTUFF_OUT_CHECKED_BAD="${RWV37_PROTONSTUFF_DIR_OUT}/checked-bad"
RWV37_PROTONSTUFF_OUT_CHECKED_GOOD="${RWV37_PROTONSTUFF_DIR_OUT}/checked-good"
RWV37_PROTONSTUFF_OUT_CHECKED_MARKED="${RWV37_PROTONSTUFF_DIR_OUT}/checked-marked"
RWV37_PROTONSTUFF_OUT_FOUNDALL="${RWV37_PROTONSTUFF_DIR_OUT}/foundall"
RWV37_PROTONSTUFF_OUT_KNOWNGOOD="${RWV37_PROTONSTUFF_DIR_OUT}/knowngood"
RWV37_PROTONSTUFF_OUT_KNOWNGOOD_BAK="${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}.bak"
RWV37_PROTONSTUFF_OUT_TOCHECK="${RWV37_PROTONSTUFF_DIR_OUT}/tocheck"
RWV37_PROTONSTUFF_OUT_TOUP="${RWV37_PROTONSTUFF_DIR_OUT}/toup"

cp -a "${RWV37_PROTONSTUFF_DIR_OUT}" "${RWV37_PROTONSTUFF_DIR_TIMESTAMPED_ARCHIVE}"

The remaining seven scripts each correspond to one of the seven steps described above in the "general overview" (i.e. other than 8. Rinse and repeat):

bin/xx-01-recordall

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

gfind "${RWV37_PROTONSTUFF_RCLONE_LOCAL_WITH_SUB}/" -type f -printf "%P\n" | sort > "${RWV37_PROTONSTUFF_OUT_FOUNDALL}"

bin/xx-02-calctocheck

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

touch "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}"
comm -23 "${RWV37_PROTONSTUFF_OUT_FOUNDALL}" "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}" > "${RWV37_PROTONSTUFF_OUT_TOCHECK}"

bin/xx-03-checkem

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

pushd "${RWV37_PROTONSTUFF_RCLONE_LOCAL}" > /dev/null

rclone check --no-traverse "${RWV37_PROTONSTUFF_RCLONE_SUB}" "${RWV37_PROTONSTUFF_RCLONE_REMOTE_WITH_SUB}" --combined - --files-from "${RWV37_PROTONSTUFF_OUT_TOCHECK}" > "${RWV37_PROTONSTUFF_OUT_CHECKED_MARKED}"

popd > /dev/null

bin/xx-04-splitchecked

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

grep    "^=" "${RWV37_PROTONSTUFF_OUT_CHECKED_MARKED}" | cut -c3- | sort > "${RWV37_PROTONSTUFF_OUT_CHECKED_GOOD}"
grep -v "^=" "${RWV37_PROTONSTUFF_OUT_CHECKED_MARKED}" | cut -c3- | sort > "${RWV37_PROTONSTUFF_OUT_CHECKED_BAD}"

bin/xx-05-updateknowngood

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

cp -a "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}" "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD_BAK}"
cat "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD_BAK}" "${RWV37_PROTONSTUFF_OUT_CHECKED_GOOD}" | sort > "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}"

bin/xx-06-calctoup

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

touch "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}"
comm -23 "${RWV37_PROTONSTUFF_OUT_FOUNDALL}" "${RWV37_PROTONSTUFF_OUT_KNOWNGOOD}" > "${RWV37_PROTONSTUFF_OUT_TOUP}"

bin/xx-07-upem

#!/usr/local/bin/bash

. "/root/bobtmpprotonchk/lib/warreng.bash"

pushd "${RWV37_PROTONSTUFF_RCLONE_LOCAL}" > /dev/null

rclone copy --no-traverse "${RWV37_PROTONSTUFF_RCLONE_SUB}" "${RWV37_PROTONSTUFF_RCLONE_REMOTE_WITH_SUB}" -P --immutable --files-from "${RWV37_PROTONSTUFF_OUT_TOUP}"

popd > /dev/null

IN CONCLUSION, I AM A DUMBASS

I hope this helps someone, but I also hope even more that it doesn't harm anyone. So, I once again want to reiterate that I am a dumbass and you'd be unwise to rely upon what I've written here.

1 Like

THANK YOU!!! Those scripts are GOLD! I've adapted them a little bit so they work flawlessly for me.

I want to backup only one folder, ~/documents. I've written an orchestrating script, which carries out all the sub-steps. Final upload is just as fast as uploading via Web-App in Browser.

All is working fine for Ubuntu 24.04. Note that this is only one-way backup! If anything changed remotely, those changes won't be synced with local folder. Additionally, local folder always "wins". This means that changes made remotely will be overwritten by local files!

bin/proton_01_recordall.sh

source proton_config.sh

echo "scanning folder ${PROTONSTUFF_RCLONE_LOCAL}..."

find "${PROTONSTUFF_RCLONE_LOCAL}/" -type f -printf "%P\n" | sort > "${PROTONSTUFF_OUT_FOUNDALL}"

bin/proton_02_calctocheck.sh

source proton_config.sh

touch "${PROTONSTUFF_OUT_KNOWNGOOD}"
comm -23 "${PROTONSTUFF_OUT_FOUNDALL}" "${PROTONSTUFF_OUT_KNOWNGOOD}" > "${PROTONSTUFF_OUT_TOCHECK}"

bin/proton_03_checkem.sh

source proton_config.sh

pushd "${PROTONSTUFF_RCLONE_LOCAL}" > /dev/null

rclone check "${PROTONSTUFF_RCLONE_LOCAL}" "${PROTONSTUFF_RCLONE_REMOTE}" --no-traverse --combined - --files-from "${PROTONSTUFF_OUT_TOCHECK}" > "${PROTONSTUFF_OUT_CHECKED_MARKED}"

popd > /dev/null

bin/proton_04_splitchecked.sh

source proton_config.sh

grep    "^=" "${PROTONSTUFF_OUT_CHECKED_MARKED}" | cut -c3- | sort > "${PROTONSTUFF_OUT_CHECKED_GOOD}"
grep -v "^=" "${PROTONSTUFF_OUT_CHECKED_MARKED}" | cut -c3- | sort > "${PROTONSTUFF_OUT_CHECKED_BAD}"

bin/proton_05_updateknowngood.sh

source proton_config.sh

cp -a "${PROTONSTUFF_OUT_KNOWNGOOD}" "${PROTONSTUFF_OUT_KNOWNGOOD_BAK}"
cat "${PROTONSTUFF_OUT_KNOWNGOOD_BAK}" "${PROTONSTUFF_OUT_CHECKED_GOOD}" | sort > "${PROTONSTUFF_OUT_KNOWNGOOD}"

*bin/proton_06_calctoup.sh

source proton_config.sh

touch "${PROTONSTUFF_OUT_KNOWNGOOD}"
comm -23 "${PROTONSTUFF_OUT_FOUNDALL}" "${PROTONSTUFF_OUT_KNOWNGOOD}" > "${PROTONSTUFF_OUT_TOUP}"

bin/proton_07_upem.sh

source proton_config.sh

pushd "${PROTONSTUFF_RCLONE_LOCAL}" > /dev/null

rclone copy --no-traverse "${PROTONSTUFF_RCLONE_LOCAL}" "${PROTONSTUFF_RCLONE_REMOTE}" -P --immutable --files-from "${PROTONSTUFF_OUT_TOUP}"

bin/proton_config.sh

set -e

PROTONSTUFF_START_TIMESTAMP=$(date -Ins)
sleep 0.01

PROTONSTUFF_RCLONE_LOCAL="/home/stefan/documents"
PROTONSTUFF_RCLONE_REMOTE="proton:backup/stefan_workstation"

PROTONSTUFF_DIR="/home/stefan/scripts/proton"

PROTONSTUFF_DIR_ARCHIVE="${PROTONSTUFF_DIR}/archive"
PROTONSTUFF_DIR_BIN="${PROTONSTUFF_DIR}/bin"
PROTONSTUFF_DIR_LIB="${PROTONSTUFF_DIR}/lib"
PROTONSTUFF_DIR_OUT="${PROTONSTUFF_DIR}/out"

PROTONSTUFF_DIR_TIMESTAMPED_ARCHIVE="${PROTONSTUFF_DIR_ARCHIVE}/${PROTONSTUFF_START_TIMESTAMP}"
PROTONSTUFF_OUT_CHECKED_BAD="${PROTONSTUFF_DIR_OUT}/checked-bad"
PROTONSTUFF_OUT_CHECKED_GOOD="${PROTONSTUFF_DIR_OUT}/checked-good"
PROTONSTUFF_OUT_CHECKED_MARKED="${PROTONSTUFF_DIR_OUT}/checked-marked"
PROTONSTUFF_OUT_FOUNDALL="${PROTONSTUFF_DIR_OUT}/foundall"
PROTONSTUFF_OUT_KNOWNGOOD="${PROTONSTUFF_DIR_OUT}/knowngood"
PROTONSTUFF_OUT_KNOWNGOOD_BAK="${PROTONSTUFF_OUT_KNOWNGOOD}.bak"
PROTONSTUFF_OUT_TOCHECK="${PROTONSTUFF_DIR_OUT}/tocheck"
PROTONSTUFF_OUT_TOUP="${PROTONSTUFF_DIR_OUT}/toup"

# Create directories if they are not yet existing
declare -a DIRECTORIES=(${PROTONSTUFF_RCLONE_LOCAL}  ${PROTONSTUFF_DIR_OUT} ${PROTONSTUFF_DIR_TIMESTAMPED_ARCHIVE})

for dir in "${DIRECTORIES[@]}"
do
    if [ ! -d "${dir}" ]; then
        echo "Creating missing directory: ${dir}"
        mkdir -p "${dir}"
    fi
done

cp -a "${PROTONSTUFF_DIR_OUT}" "${PROTONSTUFF_DIR_TIMESTAMPED_ARCHIVE}"

backup_prot.sh

echo "Backing up ~/documents to Proton Drive"

cd proton/bin
./proton_01_recordall.sh
if [ $? -ne 0 ]; then
    echo "Error in step 1"
    exit -1
fi

./proton_02_calctocheck.sh
if [ $? -ne 0 ]; then
    echo "Error in step 2"
    exit -1
fi

./proton_03_checkem.sh
#Whenever there is a new local file/folder, rclone check will throw error messages!
#If not suppressed, script will stop here otherwise.
#if [ $? -ne 0 ]; then
#    echo "Error in step 3"
#    exit -1
#fi

./proton_04_splitchecked.sh
if [ $? -ne 0 ]; then
    echo "Error in step 4"
    exit -1
fi

./proton_05_updateknowngood.sh
if [ $? -ne 0 ]; then
    echo "Error in step 5"
    exit -1
fi

./proton_06_calctoup.sh
if [ $? -ne 0 ]; then
    echo "Error in step 6"
    exit -1
fi

./proton_07_upem.sh
if [ $? -ne 0 ]; then
    echo "Error in step 7"
    exit -1
fi

echo "BACKUP SUCCESSFUL!"
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.