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

error: data decryption failed #231

Open
Schweber opened this issue Jul 27, 2024 · 4 comments
Open

error: data decryption failed #231

Schweber opened this issue Jul 27, 2024 · 4 comments
Labels
A-errors Area: error handling needs improvement

Comments

@Schweber
Copy link

I get the following:

$ rustic -P slim -P Pcloud backup                                                                                                             
[INFO] using config /home/sperber/.config/rustic/slim.toml
[INFO] using config /home/sperber/.config/rustic/Pcloud.toml
[INFO] repository rclone:Pcloud:Rustic: password is correct.
[INFO] using cache at /home/sperber/.cache/rustic/f35f1623c65f6e8ed0424d28afc17d88d13bc4dc1687c768c732d4ec1403ccbd
error: data decryption failed

If i delete the local file and run the command again, it first downloads something from the remote server but then fails with exactly the same output.

Is there something i can do? Can rustic e.g. go back to the last "good" entry point instead of failing immediately?

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Jul 27, 2024
@aawsome
Copy link
Member

aawsome commented Sep 6, 2024

Sorry for the late reply!
In fact, there have been some issues with pCloud (I'm just assuming you're using that as storage), as you can see in the restic forum. So this could be a storage corruption...

I am wondering which file(s) exactly got corrupted.
Can you please run rustic check on this repo and report the output? That said, we might as well have non-optimal error handling there which needs to be improved.

@Schweber
Copy link
Author

Schweber commented Sep 6, 2024

It is Pcloud and i'm getting the same error:

rustic check -P slim -P Pcloud --log-level debug
[INFO] using config /home/sperber/.config/rustic/slim.toml
[INFO] using config /home/sperber/.config/rustic/Pcloud.toml
[DEBUG] (1) rustic_backend::rclone: starting rclone via ["rclone", "serve", "restic", "--addr", "localhost:0", "Pcloud:Rustic"]
[DEBUG] (1) rustic_backend::rclone: using REST backend with url Pcloud:Rustic.
[DEBUG] (2) reqwest::connect: starting new connection: http://127.0.0.1:35415/
[DEBUG] (2) hyper_util::client::legacy::connect::http: connecting to 127.0.0.1:35415
[DEBUG] (2) hyper_util::client::legacy::connect::http: connected to 127.0.0.1:35415
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[INFO] repository rclone:Pcloud:Rustic: password is correct.
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[INFO] using cache at /home/sperber/.cache/rustic/f35f1623c65f6e8ed0424d28afc17d88d13bc4dc1687c768c732d4ec1403ccbd
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[00:00:00] checking Index in cache...     ████████████████████████████████████████  34.51 MiB/34.51 MiB  1.97 GiB/s   (ETA -)[00:00:00] reading index...               ████████████████████████████████████████          0[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:35415)
[DEBUG] (1) rustic_backend::rclone: killing rclone.
error: data decryption failed

It would be nice if the error output of rustic was more informative and instructional (what likely happened, what can i do about it etc.).

Best of all would be an automatic repair or rollback to a working snapshot by rustic, if that is possible.

@aawsome
Copy link
Member

aawsome commented Sep 6, 2024

Yes fully agree that the error should at least tell which files was affected.

About autmatic repair - that's nothing we want to achieve. The main point is that commands should hold their repository access properties even in error cases, e.g.:

  • check does not modify the repository
  • backup only adds new files to the repository

But there is already repair which should be a candidate for repairing all kinds of defects in the repository.

About your case: Can you run the same with higher log level, e.g. with --log-level=debug?

@aawsome aawsome added A-errors Area: error handling needs improvement and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Sep 6, 2024
@Schweber
Copy link
Author

Schweber commented Sep 6, 2024

rustic repair index -P slim -P Pcloud --log-level debug
[INFO] using config /home/sperber/.config/rustic/slim.toml
[INFO] using config /home/sperber/.config/rustic/Pcloud.toml
[DEBUG] (1) rustic_backend::rclone: starting rclone via ["rclone", "serve", "restic", "--addr", "localhost:0", "Pcloud:Rustic"]
[DEBUG] (1) rustic_backend::rclone: using REST backend with url Pcloud:Rustic.
[DEBUG] (2) reqwest::connect: starting new connection: http://127.0.0.1:37031/
[DEBUG] (2) hyper_util::client::legacy::connect::http: connecting to 127.0.0.1:37031
[DEBUG] (2) hyper_util::client::legacy::connect::http: connected to 127.0.0.1:37031
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[INFO] repository rclone:Pcloud:Rustic: password is correct.
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[INFO] using cache at /home/sperber/.cache/rustic/f35f1623c65f6e8ed0424d28afc17d88d13bc4dc1687c768c732d4ec1403ccbd
[00:00:00] listing packs...               ⠁[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[00:00:00] listing packs...[00:00:00] reading index...               ████████████████████████████████████████          0[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37031)
[DEBUG] (1) rustic_backend::rclone: killing rclone.
error: data decryption failed
rustic repair snapshots -P slim -P Pcloud --log-level debug
[INFO] using config /home/sperber/.config/rustic/slim.toml
[INFO] using config /home/sperber/.config/rustic/Pcloud.toml
[DEBUG] (1) rustic_backend::rclone: starting rclone via ["rclone", "serve", "restic", "--addr", "localhost:0", "Pcloud:Rustic"]
[DEBUG] (1) rustic_backend::rclone: using REST backend with url Pcloud:Rustic.
[DEBUG] (2) reqwest::connect: starting new connection: http://127.0.0.1:37171/
[DEBUG] (2) hyper_util::client::legacy::connect::http: connecting to 127.0.0.1:37171
[DEBUG] (2) hyper_util::client::legacy::connect::http: connected to 127.0.0.1:37171
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37171)
[INFO] repository rclone:Pcloud:Rustic: password is correct.
[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37171)
[INFO] using cache at /home/sperber/.cache/rustic/f35f1623c65f6e8ed0424d28afc17d88d13bc4dc1687c768c732d4ec1403ccbd
[00:00:00] reading index...               ████████████████████████████████████████          0[DEBUG] (2) hyper_util::client::legacy::pool: reuse idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (2) hyper_util::client::legacy::pool: pooling idle connection for ("http", 127.0.0.1:37171)
[DEBUG] (1) rustic_backend::rclone: killing rclone.
error: data decryption failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-errors Area: error handling needs improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants