rclone icon indicating copy to clipboard operation
rclone copied to clipboard

OnDemand files (Cloud Files API / Projected File System) to support partial sync

Open vexvec opened this issue 3 years ago • 4 comments

What

While sync downloads all files locally, mount does not download files normally, despite of the caching. It would be favorable to have a similar experience like OneDrive / GDrive / OwnCloud Clients where a directory can be synced "virtually". This means that the cloud files are projected into a local directory via placeholders and do not consume storage. Only files that are needed can be synced to the local storage and consume storage.

Why

This would allow mobile work scenarios where large cloud storages can be partially synced and the user can work on the files. Currently the only possibilities are syncing the whole storage (much local storage required) or mounting a volume (Not available while not connected to the network).

vexvec avatar Mar 21 '22 11:03 vexvec

Beware, this is just the idle ramblings of someone who uses rclone a tonne and is semi-familar with how the mounts work

The problem with the placeholder idea is a lot of things in how mount works is heavily dictated by what the hoster you are using supports. There are a lot of things you can do to a local file that don't translate to a file that can easily be tracked and synced to the host.

Masamune3210 avatar Mar 21 '22 11:03 Masamune3210

@Masamune3210 Thank you for your rapid response. You're right that it can be a little tricky but it is currently used in the mentioned native clients. Sure they know how to handle their specific implementations and it is not as easy with a tool like rclone that supports multiple providers.

The mentioned APIs that the clients use are C++ APIs therefore it is even harder to implement in rclone because CGO is needed (But I think because of the FUSE implementation CGO is already used).

Therefore my suggestion was to simulate these APIs (a simple, limited, implementation) in the VFS so that they can also be used cross platform (Win, Linux, Mac).

vexvec avatar Mar 21 '22 12:03 vexvec

I don't see much use for this imo as rclone generally is an online tool and not expected to work offline at the core. I know there is some user base on mobile (android) as I'd imagine that is a small amount.

Most of what you ask is semi covered by mounting as thats partial use but also requires online.

I can tag at as an enhancement and most likely it'll sit for a long period unless someone was to pick it up, but wanted to set expectations as it's not really rclone (from my perspective) and use case seems small.

animosity022 avatar Mar 22 '22 16:03 animosity022

Apologies for the lateness of the post, but wanted to add some incremental use case perspective because I would love offline-sync in rclone.

I would use this capability to mark folders and files I am working on as available offline. This would allow me to travel on public transport (plane, train, bus, subway, taxi, ride-share) and continue to work. It would also allow me to work at locations without Internet access or where WiFi guest access is just poor (waiting rooms, other companies etc.).

This is a modified use case for laptops for users who treat cloud storage as the primary/main storage location. I use this functionality with Windows' OneDrive capability - which is great, but also brain dead as I cannot create new files when offline. And I don't use OneDrive for personal stuff.

I acknowledge Bi-Sync can provide this in some way, but it requires that I sync everything, or move files to specific sync folders which are then sync'ed and copied back to the right location when I am finished.

Thanks

am4c130d avatar Jun 24 '24 14:06 am4c130d