Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend openDAL Backend cannot be loaded: scheme is not enabled or supported #1161

Closed
nickchomey opened this issue Jun 7, 2024 · 9 comments · Fixed by rustic-rs/rustic_core#249
Labels
A-backends Area: Related to backends in `rustic-core` A-core Area: Generally related to `rustic_core` C-bug Category: Something isn't working as expected

Comments

@nickchomey
Copy link

nickchomey commented Jun 7, 2024

I am getting this error when I try to use onedrive and gdrive. I assume it is the case for others too..

backend openDAL Backend cannot be loaded: Unsupported (permanent) at , context: { scheme: onedrive } => scheme is not enabled or supported

repository = "opendal:onedrive"
password = ""

[repository.options]
access_token = "token"
root = "/root/path"

Here's what OpenDAL says about onedrive
https://docs.rs/opendal/latest/opendal/services/struct.Onedrive.html

When I change it to opendal:gdrive i get the same thing.

But if I try b2 or s3, it just gives me an error regarding the bucket being invalid (since I didnt provide any credentials for it). That suggests to me that onedrive, gdrive and others are simply broken - either within OpenDAL itself or, more likely, how it was integrated into Rustic

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Jun 7, 2024
@nickchomey
Copy link
Author

nickchomey commented Jun 7, 2024

Is this the issue here? https://github.com/rustic-rs/rustic_core/blob/f1f73dbfa3b47f65fb55da2ba45062de32436bc1/crates/backend/Cargo.toml#L91

You've only seemingly included some of the available services

  • services-b2
  • services-sftp
  • services-swift
  • services-azblob
  • services-azdls
  • services-cos
  • services-fs
  • services-gcs
  • services-ghac
  • services-http
  • services-ipmfs
  • services-memory
  • services-obs
  • services-oss
  • services-s3
  • services-webdav
  • services-webhdfs
  • services-azfile
  • layers-blocking
  • layers-throttle

Surely there's a way to include everything by default (to accomodate new services that get added in the future, without needing to monitor them) and then selectively exclude specific ones (like stfp for windows)?

I'm eager to incorporate rustic into an open-source tool and the opendal backend would make this much easier. So, I hope this can get fixed and pushed into a new release soon!

@intgr
Copy link
Contributor

intgr commented Jun 12, 2024

I tried patching in OpenDAL OneDrive backend and using it. But there was no documentation about how to get the access_token value needed for it. After prompting them, here is some guidance how to do it, but it requires using some other library:

Then I tried using GNOME's built-in OneDrive support via FUSE. This failed because there are memory leaks 😆 reported here: https://gitlab.gnome.org/GNOME/gvfs/-/issues/742

@intgr
Copy link
Contributor

intgr commented Jun 13, 2024

The saga continues. I eventually got FUSE/GVFS/OneDrive backup done, by doing it chunk by chunk and restarting GVFS daemon before it leaked too much. But now I have repository corruption that cannot be resolved with rustic repair 😆

TL;DR: I found that rclone is a much better way to work with OneDrive, it is wayy faster than GVFS was. Although I think I have to redo the backup from scratch due to pre-existing corruption (#1164).

The documentation for rclone was a bit scarce, but I needed to run rclone config and add add to Rustic config: repository = "rclone:<rclone-remote-name>:<onedrive-path>"

More info on rclone OneDrive support here: https://rclone.org/onedrive/

@aawsome aawsome added C-bug Category: Something isn't working as expected A-backends Area: Related to backends in `rustic-core` A-core Area: Generally related to `rustic_core` and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Aug 29, 2024
@aawsome
Copy link
Member

aawsome commented Aug 29, 2024

@nickchomey We are trying to prepare a patch version 0.8.1 soon and I think we can integrate the fix there.

aawsome added a commit to rustic-rs/rustic_core that referenced this issue Aug 29, 2024
@nickchomey
Copy link
Author

nickchomey commented Sep 4, 2024

@aawsome There seem to be at least 60 services supported by OpenDAL, but you only added three.

Perhaps rather than manually tracking this - which will always be a huge hassle - you can find a way to just automatically parse the available features/services?

@nickchomey
Copy link
Author

@intgr what are you using these days for rustic + onedrive? still rclone?

@intgr
Copy link
Contributor

intgr commented Sep 5, 2024

Yes, rclone works great.

@aawsome
Copy link
Member

aawsome commented Sep 5, 2024

@nickchomey Thanks for your suggestion.
In fact, out of the 60 services, there are many which most likely will never be interesting as backup storage. And for those we actually don't want to compile support as that would just bloat the binary sizes without value

Moreover, as opendal designed the services as opt-in, there is no easy way to just just use all or maybe only opt-out non-needed services. Acuatally even in their self-provided CLI oli they specify each service directly, see https://github.com/apache/opendal/blob/main/bin/oli/Cargo.toml

@nickchomey
Copy link
Author

Ok. Thanks for providing onedrive!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backends Area: Related to backends in `rustic-core` A-core Area: Generally related to `rustic_core` C-bug Category: Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants