-
Notifications
You must be signed in to change notification settings - Fork 69
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
Improve error handling and display to user when opening a repository #958
Comments
I forgot to precise that I use rustic 0.6.1, that I installed using I also tried using a very simple config file [repository]
repository = "rclone:garage:my_bucket"
password = "aaaa" I can run ➜ ~ rustic init
using config /home/huetremy/.config/rustic/rustic.toml
[INFO] key 6e461227 successfully added.
[INFO] repository 93747363 successfully created.
[INFO] using cache at /home/huetremy/.cache/rustic/93747363a72599de2b71c32f8bcf45d4f597917dc3a0eadb205d8da2a7dfd700
➜ ~ rustic check
using config /home/huetremy/.config/rustic/rustic.toml
error: incorrect password! |
@huetremy Thanks for opening this issue! Can you reproduce it on the local backend? If not, can you try to copy the repo to some local dir and try to access it using a local repo path? Or do it the other way: Initialize a local one and manually copy it to the S3 backend, is rustic able to access that as a remote repo? |
Hi ! Here are the tests you suggested :
➜ ~ rustic -r /tmp/test_local init
using no config file, none of these exist: /home/huetremy/.config/rustic/rustic.toml, /etc/rustic/rustic.toml, ./rustic.toml
enter password for new key: [hidden]
[INFO] key 94cbe721 successfully added.
[INFO] repository 266a680d successfully created.
[INFO] using cache at /home/huetremy/.cache/rustic/266a680dc3762f84a94941236b3a329beaf64d37ec6baafd8bb624ebde36036e
➜ ~ rustic -r /tmp/test_local check
using no config file, none of these exist: /home/huetremy/.config/rustic/rustic.toml, /etc/rustic/rustic.toml, ./rustic.toml
enter repository password: [hidden]
[INFO] repository local:/tmp/test_local: password is correct.
[INFO] using cache at /home/huetremy/.cache/rustic/266a680dc3762f84a94941236b3a329beaf64d37ec6baafd8bb624ebde36036e
[00:00:00] reading index... ████████████████████████████████████████ 0/0 [00:00:00] listing packs... [00:00:00] cleaning up packs from cache... [00:00:00] reading snapshots... ████████████████████████████████████████ 0/0 [00:00:00] checking trees... ████████████████████████████████████████ 0/0
➜ ~ rclone sync /tmp/test_local garage:remy-pc-backups
➜ ~ rclone lsl garage:remy-pc-backups
155 2023-12-03 10:22:29.690803934 config
363 2023-12-03 10:22:29.690803934 keys/513d6a52a432137c45b74cb5172b48350f7c86b258608f44c651be4482aa3563
➜ ~ rustic -r rclone:garage:remy-pc-backups check
using no config file, none of these exist: /home/huetremy/.config/rustic/rustic.toml, /etc/rustic/rustic.toml, ./rustic.toml
enter repository password: [hidden]
enter repository password: [hidden]
enter repository password: [hidden]
enter repository password: [hidden]
enter repository password: [hidden]
error: incorrect password I tried then to create a repo on the backend, and copying it with rclone gave me the following error : ~ rclone copy garage:remy-pc-backups /tmp/test
2023/12/03 09:45:50 ERROR : config: Failed to copy: failed to open source object: AccessDenied: Forbidden: Invalid signature
status code: 403, request id: , host id:
2023/12/03 09:45:50 ERROR : keys/c61e0e8042e31aa25e14913d686e01c1cf39a6baabbf613be211747d6e9e3a43: Failed to copy: failed to open source object: AccessDenied: Forbidden: Invalid signature
status code: 403, request id: , host id: Il clearly seems that I missconfigured my rclone backend (while I did it well with Minio client...) and that it is not a problem from rustic. I will investigate that and tell you if everything is ok |
I agree that this seems to be a backend problem. Anyway, I think rustic must improve the error message here, so that users can identify more easily where the problem is. |
Just wanted to add that this messed-up error handling only takes place if you don't specify your password anywhere (config file, password file, password command), but rely on really typing your password into the password prompt. A workaround - until this is fixed - is to use one of the above password options. This will give you correct error information. |
Hi ! Thank you for this awesome tool !
I have a problem using rustic with S3 backend.
Steps
rustic -r rclone:backend:bucket init
, and set a password. The command returns that it successfully created the repoI checked the content of the bucket with Minio client, and I can see the
config
file andkeys
folder, meaning that rustic indeed wrote to this repository.However, whenever I try to access it (with a check, a snapshots, a backup...) it always returns me that the provided password is not good (of course, I tried with very simple passwords to be sure).
Am I doing something wrong ?
Thank you again !
The text was updated successfully, but these errors were encountered: