Comments (5)
With the current version, I was finally completed the backup of my 650GB fotos+videos from our travels in decent time 🎉
from rclone.
Great idea :-)
I gave your PR an initial review.
from rclone.
Hey @ncw ,
while my initial PR was open for a while, I gave the topic some more thoughts based on your review and my observations during when working with my fork:
As you already mentioned the pcloud API is pretty generic and instead of chunk writer we can simply implement OpenWriterAt, sparing a lot of duplicated logic. Nice!
Additionally, pcloud does show partially uploaded files (and leaves them broken on unfinished uploads), also in the current implementation.
The current implementation tries to fix it by trying to delete on error, but this doesn't always work, e.g. when killing the process ungracefully or when the error is due to persistent connection loss.
So IMHO setting the feature PartialUploads
to true would be the cleanest option.
This will also fix some random race conditions: On some uploads, pcloud API seems to have caching issues when altering files via fileops API and query them via file API. With PartialUploads enabled, the final step (renaming the uploaded file) is done via file API and that didn't show caching issues.
Yet this brings one huge drawback to the chunked upload: We have no way to skip already uploaded chunks on partial files anymore, as the retry gets a new random suffix.
proposed solution
In order to fix this, I came up with a solution I'd like to discuss (outlined/implemented in #7949):
- Implement stable partial suffixes instead of random ones, by hashing the source info.
- Add a feature flag for backends that support resuming partial uploads, skipping deletion on error
- Implement OpenWriterAt instead of OpenChunkedWriter for pcloud backend
With 1 and 2, we pcloud can cleanly set PartialUploads to true while keeping the resume functionality.
This could be useful for other backends as well, that also support resuming uploads but have PartialUploads enabled.
What do you think?
from rclone.
@ncw , as I removed the resume part from my PR, I'd like to move the discussion about the resume here.
Your comment on the PR:
However I don't like the resume changes. Rclone backends don't resume, and it is very difficult to do and ensure data integrity (how are we 100% sure that the partial file uploaded is the same as the start of the file we are about to upload?).
This could be the responsibility of the backend, couldn't it?
E.g. pcloud offers an API to get the checksum on any part of the file. When uploading a chunk, we can query the checksum first and skip if it fits.
Additionally, as a last line of defense, the copy operation still checks the integrity of the whole file after the resumed upload has finished.
Looking forward to your thoughts on this
from rclone.
I suggest you check out #87 and #4547 for a framework for doing this for lots of backends. This never got merged though so needs a champion to take it over.
from rclone.
Related Issues (20)
- Need option for setting returned file size when using HTTP filesystem with --http-no-head HOT 1
- Cloudinary backend
- Different modtime is ignored in equal function HOT 1
- pCloud doc update API endpoint HOT 1
- read/write from shared folder - doc update HOT 2
- Prevent multiple rclone processes from running at the same time HOT 2
- `rclone listremotes --long` output changed in v1.68.0 breaks existing automation HOT 4
- rclone config create error HOT 4
- Binary size HOT 3
- rclone failed continuously with WebUI HOT 1
- [ProtonDrive] Signature Verification Error: No matching signature HOT 1
- Non-encryption support for NetStorage key HOT 1
- pikpak error getting token HOT 48
- add --local-fatal-if-no-space HOT 1
- Use code signing for macOS HOT 6
- rclone sync: rclone says it removing existing excluded directories, yet it removes only files HOT 1
- Insecure single-command signed-SHA256 validation HOT 2
- bisync through Dropbox+crypt constantly critically fails due to off-by-one differences in modtime HOT 8
- snap2html
- Onedrive Personal client_id docs instructions are no longer valid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rclone.