pCloud keeps partial interrupted uploads

First and foremost - Hi all and thank you for your time and hard work! :+1:

What is the problem you are having with rclone?

When an uncached file transfer to pCloud is interrupted due to losing internet, pCloud seems to keep the partially uploaded file around (it can take a few minutes to appear in pCloud).

First off I'd like to ask if this is the intended behavior or if an "all or nothing" is expected?

If this is indeed intended, is there any way of avoiding leaving half-uploaded files around with the same name as the final file, e.g. by forcing rclone to upload to a .partial file, as it does with a number of other destinations, like sftp?

(I can't seem to find an opposite flag to --inplace in the documentation and --partial-suffix seems to only affect destinations that already use temporary files.)

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

rclone v1.66.0
- os/version: darwin 14.2.1 (64 bit)
- os/kernel: 23.2.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.22.1
- go/linking: dynamic
- go/tags: cmount

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

pCloud

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

  1. Have a 1 GiB file named file
$ rclone lsl file
1073741824 2024-03-17 22:16:40.358814994 file
  1. Start a copy of file to pCloud.
$ rclone copy -v -P file pcloud:
Transferred:   	   10.871 MiB / 1 GiB, 1%, 652.236 KiB/s, ETA 26m30s
Transferred:            0 / 1, 0%
Elapsed time:        18.0s
Transferring:
 *                                          file:  1% /1Gi, 652.204Ki/s, 26m30s^C
  1. Interrupt internet connection before transfer is complete.

  2. Interrupt rclone (CTRL+C).

  3. Restore internet connection.

  4. Observe pCloud partially uploaded file.

$ rclone lsl -v pcloud:file
 11087872 2024-03-17 22:16:40.000000000 file

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

[pcloud]
type = pcloud
hostname = eapi.pcloud.com
token = XXX

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

(I omitted the -vv only to avoid noise from the discussion. I'd be happy to supply it if it is relevant!)

Thank you for taking the time!

I can reproduce it. It is definitely not typical cloud storage behaviour.

Yes I would expect "all or nothing" too. But clearly this is not the case here.

It would be good workaround. Should not be difficult to add. Have a look at original --inplace PR

To add it to pCloud would require only adding PartialUploads: true feature to pCloud remote here:

and updating documentation including adding " Limitations" section to pCloud one with explanation why --inplace is used.

You can try to have a go and propose PR maybe?

hi.
yes, i think it is intended behavior.
pcloud supports resumable uploads, so it makes sense the partial uploads would remain.

pcloud has an api parameter to prevent partial uploads.
If nopartial is set, partially uploaded files will not be saved (that is when the connection breaks

in that case, if the internet goes down, --inplace would not make a practical difference.

tho, if rclone did support --inplace for pcloud, then could list and/or delete the partial uploads
rclone ls --include='*.partial'
rclone delete --include='*.partial'

if all is true, then best for rclone to use the api parameter.
tho, @kapitainsky has shown, could easily add --inplace to pcloud.

Problem is that rclone does not support any form of resumable uploads and in case of pCloud simply starts uploading files again...

And without using PartialUploads feature set it is impossible to tell if upload finished or not.

It would be ideal if pCloud API could be leveraged here but it is probably something depending on (which is general framework to support resume):

Which after 4 years and 100+ comments is nowhere:)

In the meantime I suggest whoever needs PartialUploads for pCloud creates PR. This one is very easy.

i agree, as you have shown, rclone could easily add --inplace for pcloud.

but not a solution to the OP issue.
for that, rclone would need to set nopartial parameter for the api call.

Yeap - agree. PartialUploads is workaround only.

Thank you both for you comments. This is actually quite illuminating.

Thanks @asdffdsa for the link. Seems like pCloud will discard partial uploads if nopartial is set.

And thanks @kapitainsky for your link, as it looks like rclone does set that flag.

Hmm, is this a bug I should report to pCloud?

Thanks!

ok, so rclone already uses that paramter.

as for being a bug, not sure yet if the issue is with rclone, pcloud or both.
would have to run a test, copy a single file using --dump=headers, killing the internet before upload completes.
from that, we could see what rclone and pcloud are doing.

From pCloud API docs:

If nopartial is set, partially uploaded files will not be saved (that is when the connection breaks before file is read in full).

which exactly means that rclone does not resume anything.

pCloud should not save it - but it does. So indeed looks like a bug on their end.

Or their understanding is very different to ours:)

Looks to me like rclone did set the nopartial flag.

--dump=headers gave me this snippet:

...
2024/03/18 08:04:45 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/03/18 08:04:45 DEBUG : file: Need to transfer - File not found at Destination
2024/03/18 08:04:46 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/03/18 08:04:46 DEBUG : HTTP REQUEST (req 0x140005a7e60)
2024/03/18 08:04:46 DEBUG : PUT /uploadfile?filename=file&folderid=0&mtime=1710739000&nopartial=1 HTTP/1.1
...
Transferred:   	    6.621 MiB / 1 GiB, 1%, 1.656 MiB/s, ETA 10m14s
Transferred:            0 / 1, 0%
Elapsed time:         5.5s
Transferring:
 *                                          file:  0% /1Gi, 1.656Mi/s, 10m14s^C

Also, looks like the partial file remains even if I issue a CTRL-C with internet connected.

$ rclone lsl pcloud:file
  6926336 2024-03-17 22:16:40.000000000 file

Seems like contacting pCloud support is my next step?

Thanks!

yeah, let's us know how pcloud responds...

Hi all,

pCloud Support got back to me and very politely informed me that they don't offer technical support on the developer API.

I did formulate my email as a question, asking wether what I'm seeing is expected behavior, so I guess that's fair.

I wrote back, asking if I could file a bug report with the developers. We'll see what they say.

Thanks,
Alex

1 Like

Bug report filed.

Support was friendly and said they forwarded it to the devs but did not specifically say they'd get back to me. I'll update here if they do.

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