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 - Can't List Snapshots #1154

Open
ossie-git opened this issue May 16, 2024 · 5 comments
Open

error: data decryption failed - Can't List Snapshots #1154

ossie-git opened this issue May 16, 2024 · 5 comments
Labels
A-commands Area: Related to commands in `rustic` A-core Area: Generally related to `rustic_core` A-errors Area: error handling needs improvement A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected

Comments

@ossie-git
Copy link

ossie-git commented May 16, 2024

Hi,

I have a repository that suddenly won't allow me to list snapshots. It was working fine before today. This is what I see when I run a snapshots command:

$ rustic -P aws snapshots
[INFO] using config /home/o/.config/rustic/aws.toml
[INFO] repository local:/mnt/hard/O/Backups/Rustic/AWS: password is correct.
[INFO] using no cache
error: data decryption failed

Other commands such as find also don't work (I'm using the nightly builds):

$ rustic -P aws find --iglob "*.pdf"
[INFO] using config /home/o/.config/rustic/aws.toml
[INFO] repository local:/mnt/hard/O/Backups/Rustic/AWS: password is correct.
[INFO] using no cache
[00:00:00] reading index...               ████████████████████████████████████████         22/22        [00:00:00] getting snapshots...           ████████████████████████████████████████          0
error: data decryption failed

At the same time, some commands such as backup do work:

$ rustic -P aws backup
[INFO] using config /home/o/.config/rustic/aws.toml
[INFO] repository local:/mnt/hard/O/Backups/Rustic/AWS: password is correct.
[INFO] using no cache
[00:00:00] reading index...               ████████████████████████████████████████         22/22        [INFO] using all backup sources from config file.
[INFO] merging source="/home/o/Downloads/AWS" section from config file
[INFO] using no parent
[INFO] starting to backup "/home/o/Downloads/AWS"...
[00:00:01] backing up...                  ████████████████████████████████████████ 187.70 MiB/187.70 MiB 159.86 MiB/s (ETA -)Files:       9 new, 0 changed, 0 unchanged
Dirs:        5 new, 0 changed, 0 unchanged
Added to the repo: 0 B (raw: 0 B)
processed 9 files, 187.7 MiB
snapshot 38151dc1 successfully saved.
[INFO] backup of "/home/o/Downloads/AWS" done.

and:

$ rustic -P aws repoinfo
[INFO] using config /home/o/.config/rustic/aws.toml
[00:00:02] scanning files...                                                                          [INFO] repository local:/mnt/hard/O/Backups/Rustic/AWS: password is correct.
[INFO] using no cache
[00:00:00] scanning index...              ████████████████████████████████████████         22/22        repository files

| File type | Count | Total Size |
|-----------|-------|------------|
| Key       |     1 |      363 B |
| Snapshot  |    47 |   24.2 kiB |
| Index     |    22 |   18.1 kiB |
| Pack      |    47 |  121.0 MiB |
| Total     |   117 |  121.0 MiB |


| Blob type | Count | Total Size | Total Size in Packs |
|-----------|-------|------------|---------------------|
| Tree      |   110 |  358.4 kiB |           134.3 kiB |
| Data      |   155 |  152.0 MiB |           120.8 MiB |
| Total     |   265 |  152.3 MiB |           121.0 MiB |

| Blob type  | Pack Count | Minimum Size | Maximum Size |
|------------|------------|--------------|--------------|
| Tree packs |         22 |      6.3 kiB |      6.4 kiB |
| Data packs |         25 |     69.8 kiB |     34.3 MiB |

I'm currently using the following (as I want the find command):

$ rustic --version
rustic v0.7.0-45-gfc8e3c5-nightly

I also downloaded and tried it on the stable version and have the same problem:

$ ./rustic --version
rustic v0.7.0

My configuration is very simple (I have another repo with the exact same configuration options which is still working fine):

[repository]
repository = "/mnt/hard/O/Backups/Rustic/AWS"
password = "password"
no-cache = true # no cache needed for local repository

[forget]
keep-hourly = 24
keep-daily = 14
keep-weekly = 8
keep-monthly = 24
keep-yearly = 10

[backup]
#exclude-if-present = [".nobackup", "CACHEDIR.TAG"]
#glob-file = ["/root/rustic-local.glob"]
one-file-system = true

[[backup.sources]]
source = "/home/o/Downloads/AWS"
git-ignore = true

Any ideas? Thanks

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label May 16, 2024
@ossie-git
Copy link
Author

ossie-git commented May 16, 2024

Restic appears to be able to run snapshots on the repository:

$ restic -r /mnt/hard/O/Backups/Rustic/AWS/ snapshots
enter password for repository:
repository 9fd2c6f9 opened (version 2, compression level auto)
created new cache in /home/o/.cache/restic
Ignoring "7f008c6609065eb9a03134440168bebe280b4b0b6f56c6f6b0c6876f2e175915": failed to load snapshot 7f008c66: invalid data returned
ID        Time                 Host        Tags        Paths
----------------------------------------------------------------------------
5f7097a5  2024-05-14 16:20:59  dell                    /home/o/Downloads/AWS
c6fa2e44  2024-05-14 16:21:03  dell                    /home/o/Downloads/AWS
fbf9571d  2024-05-14 17:40:01  dell                    /home/o/Downloads/AWS
...

@aawsome
Copy link
Member

aawsome commented May 17, 2024

Seems like the snapshot file 7f008c6609065eb9a03134440168bebe280b4b0b6f56c6f6b0c6876f2e175915 is defect.

So yes, the error message should be improved such that you can see where data decryption failed. Also we could ignore defect snapshot files like restic does. These are IMO good UX improvements.

@ossie-git Can you please post the output of rustic check? There at least some useful information should be given, it not this is a UX bug, IMO.

@aawsome aawsome added the A-ui-ux Area: Related to user interfaces and user experience label May 17, 2024
@ossie-git
Copy link
Author

$ rustic -P aws check
[INFO] using config /home/o/.config/rustic/aws.toml
[INFO] repository local:/mnt/hard/O/Backups/Rustic/AWS: password is correct.
[INFO] using no cache
[00:00:00] reading index...               ████████████████████████████████████████         24/24        [00:00:00] listing packs...               ⠁
[00:00:00] listing packs...
error: data decryption failed

@aawsome
Copy link
Member

aawsome commented May 17, 2024

@ossie-git Thanks. This is not how it should be 😉

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

Do you have any idea why the backup might have become corrupted. I'm just guessing but it might have been right as I was suspending my PC

@simonsan simonsan added the A-errors Area: error handling needs improvement label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-commands Area: Related to commands in `rustic` A-core Area: Generally related to `rustic_core` A-errors Area: error handling needs improvement A-ui-ux Area: Related to user interfaces and user experience C-bug Category: Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants