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

Rustic opendal:b2 doesn't work on Windows #1162

Closed
douglasparker opened this issue Jun 8, 2024 · 6 comments · Fixed by rustic-rs/rustic_core#340
Closed

Rustic opendal:b2 doesn't work on Windows #1162

douglasparker opened this issue Jun 8, 2024 · 6 comments · Fixed by rustic-rs/rustic_core#340
Labels
A-backends Area: Related to backends in `rustic-core` C-bug Category: Something isn't working as expected

Comments

@douglasparker
Copy link

It works fine on Linux, but on Windows I get hit with:

[INFO] using config C:\Users\Douglas Parker\AppData\Roaming\rustic\config\rustic.toml
[WARN] service=b2 operation=stat path=keys\a78464a933185e874b3f08533249cef3dacdfc52c5895a86fefd4ab889400c6f -> NotFound (persistent) at stat, context: { service: b2, path: keys\a78464a933185e874b3f08533249cef3dacdfc52c5895a86fefd4ab889400c6f } => no such file or directory
error: incorrect password!

Same rustic.toml between platforms.

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

Rclone backend works fine on Windows with the same API keys.

@aawsome
Copy link
Member

aawsome commented Aug 13, 2024

I would guess that this is an opendal issue..
I just updated to the newest opendal version. @douglasparker Can you please test if the latest nightly version still has this problem?

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

NeurekaSoftware commented Oct 24, 2024

@aawsome I also have this issue with Rustic v0.9.3!

The same exact rustic.toml works with Linux. opendal is definitely not working properly on Windows.

Trace Logging

PS C:\Users\Neureka> rustic backup
[INFO] using config C:\Users\Neureka\AppData\Roaming\rustic\config\rustic.toml
[DEBUG] (1) opendal::services::b2::backend: backend build started: B2Builder { config: B2Config { root: None, application_key_id: Some("<redacted>"), bucket_id: "<redacted>", bucket: "<redacted>", .. }, .. }
[DEBUG] (1) opendal::services::b2::backend: backend use root /
[DEBUG] (1) opendal::services::b2::backend: backend use bucket <redacted>
[DEBUG] (1) opendal::services::b2::backend: backend bucket_id <redacted>
[DEBUG] (1) opendal::services: service=b2 name= : metadata started
[DEBUG] (1) opendal::services: service=b2 name= : metadata finished
[DEBUG] (1) opendal::services: service=b2 name= : metadata started
[DEBUG] (1) opendal::services: service=b2 name= : metadata finished
[DEBUG] (1) opendal::services: service=b2 name= : metadata started
[DEBUG] (1) opendal::services: service=b2 name= : metadata finished
[DEBUG] (1) opendal::services: service=b2 name= : metadata started
[DEBUG] (1) opendal::services: service=b2 name= : metadata finished
[TRACE] (1) rustic_backend::opendal: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rustic_backend-0.4.1\src\opendal.rs:158] listing tpe: Config
[DEBUG] (1) opendal::services: service=b2 name= path=config: stat started
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:671] checkout waiting for idle connection: ("https", api.backblazeb2.com)
[DEBUG] (1) reqwest::connect: starting new connection: https://api.backblazeb2.com/
[TRACE] (1) hyper_util::client::legacy::connect::http: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\connect\http.rs:372] Http::connect; scheme=Some("https"), host=Some("api.backblazeb2.com"), port=None
[DEBUG] (1) hyper_util::client::legacy::connect::dns: resolve; host=api.backblazeb2.com
[TRACE] (1) tracing::span: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\connect\dns.rs:121] -- resolve;
[DEBUG] (34) hyper_util::client::legacy::connect::dns: resolving host="api.backblazeb2.com"
[DEBUG] (1) hyper_util::client::legacy::connect::http: connecting to 104.153.233.176:443
[DEBUG] (1) hyper_util::client::legacy::connect::http: connected to 104.153.233.176:443
[TRACE] (1) hyper_util::client::legacy::client: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\client.rs:592] http1 handshake complete, spawning background dispatcher task
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:713] checkout dropped for ("https", api.backblazeb2.com)
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:349] put; add idle connection for ("https", api.backblazeb2.com)
[DEBUG] (1) hyper_util::client::legacy::pool: pooling idle connection for ("https", api.backblazeb2.com)
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:671] checkout waiting for idle connection: ("https", api002.backblazeb2.com)
[DEBUG] (1) reqwest::connect: starting new connection: https://api002.backblazeb2.com/
[TRACE] (1) hyper_util::client::legacy::connect::http: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\connect\http.rs:372] Http::connect; scheme=Some("https"), host=Some("api002.backblazeb2.com"), port=None
[DEBUG] (1) hyper_util::client::legacy::connect::dns: resolve; host=api002.backblazeb2.com
[TRACE] (1) tracing::span: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\connect\dns.rs:121] -- resolve;
[DEBUG] (34) hyper_util::client::legacy::connect::dns: resolving host="api002.backblazeb2.com"
[DEBUG] (1) hyper_util::client::legacy::connect::http: connecting to 149.137.142.15:443
[TRACE] (2) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:808] idle interval checking for expired
[DEBUG] (1) hyper_util::client::legacy::connect::http: connected to 149.137.142.15:443
[TRACE] (1) hyper_util::client::legacy::client: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\client.rs:592] http1 handshake complete, spawning background dispatcher task
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:713] checkout dropped for ("https", api002.backblazeb2.com)
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:349] put; add idle connection for ("https", api002.backblazeb2.com)
[DEBUG] (1) hyper_util::client::legacy::pool: pooling idle connection for ("https", api002.backblazeb2.com)
[DEBUG] (1) opendal::services: service=b2 name= path=config: stat finished
[TRACE] (1) rustic_backend::opendal: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rustic_backend-0.4.1\src\opendal.rs:158] listing tpe: Key
[DEBUG] (1) opendal::services: service=b2 name= path=keys/: list started
[DEBUG] (1) opendal::services: service=b2 name= path=keys/: list created lister
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=0: List::next started
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:645] take? ("https", api002.backblazeb2.com): expiration = Some(90s)
[DEBUG] (1) hyper_util::client::legacy::pool: reuse idle connection for ("https", api002.backblazeb2.com)
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:349] put; add idle connection for ("https", api002.backblazeb2.com)
[DEBUG] (1) hyper_util::client::legacy::pool: pooling idle connection for ("https", api002.backblazeb2.com)
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=1 entry=keys/: List::next succeeded
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=1: List::next started
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=2 entry=keys/e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85: List::next succeeded
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=2: List::next started
[TRACE] (1) opendal::services: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\opendal-0.50.0\src\layers\logging.rs:222] service=b2 name= path=keys/ listed=2: List::next finished
[TRACE] (1) rustic_backend::opendal: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rustic_backend-0.4.1\src\opendal.rs:210] reading tpe: Key, id: e0667b00
[DEBUG] (1) opendal::services: service=b2 name= path=keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85: stat started
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:645] take? ("https", api002.backblazeb2.com): expiration = Some(90s)
[DEBUG] (1) hyper_util::client::legacy::pool: reuse idle connection for ("https", api002.backblazeb2.com)
[TRACE] (1) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:349] put; add idle connection for ("https", api002.backblazeb2.com)
[DEBUG] (1) hyper_util::client::legacy::pool: pooling idle connection for ("https", api002.backblazeb2.com)
[WARN] service=b2 name= path=keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85: stat failed NotFound (persistent) at stat, context: { service: b2, path: keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85 } => no such file or directory
[DEBUG] (1) opendal::services: service=b2 name= path=keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85: stat failed
error: NotFound (persistent) at stat, context: { service: b2, path: keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85 } => no such file or directory
[TRACE] (31) hyper_util::client::legacy::pool: [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\hyper-util-0.1.9\src\client\legacy\pool.rs:791] pool closed, canceling idle interval

@aawsome
Copy link
Member

aawsome commented Oct 24, 2024

I think this is the same problem as #1302

@aawsome
Copy link
Member

aawsome commented Oct 24, 2024

[WARN] service=b2 name= path=keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85: stat failed NotFound (persistent) at stat, context: { service: b2, path: keys\e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85 } => no such file or directory

This is the problem. We should look for keys/e0667b00138865aaadec6b32ae1ac40cf5c63138c912b60c07e8a0e37e17df85 instead. I think the PR fixes this as it uses unix-style paths instead of OS-dependent paths from std Rust.

github-merge-queue bot pushed a commit to rustic-rs/rustic_core that referenced this issue Oct 24, 2024
We now always use UnixPaths to generate the path used in opendal URLs.

closes rustic-rs/rustic#1162
closes rustic-rs/rustic#1302
closes rustic-rs/rustic#1305
@NeurekaSoftware
Copy link

You guys are awesome! Thanks for the quick fix!

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` C-bug Category: Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants