Unable to recover restic backup: Help appreciated

Dear community,

my restic repository does not load properly. I suspect a broken hard-drive, but lets not get ahead of ourselfes. These are the facts:

  • I am using restic version “restic 0.16.4 compiled with go1.22.2 on linux/amd64” on my main machine, but have been using “restic 0.18.1 compiled with go1.25.1 on linux/arm” as well since I migrated some of the recovery attempts to a beefier machine.

- I am getting errors of this type (Abbreviated from the original shell output which I kept):

$ restic check -r VollBackUp --read-data
error: failed to load snapshot f27889d6: LoadRaw(<snapshot/f27889d6c1>): invalid data returned
[0:24] 100.00% 15 / 15 snapshots
read all data
pack 5a2a46ab693f028e6d7987351e1085cfb1386c781c60c6e8ff5ec6e670b8fd05 contains 2 errors: [blob 1101a787a1f2192c0f56af6130985fb0baec6f7dbd64826723cd2fcee8a77a24: decrypting blob <data/1101a787> from pack 5a2a46ab693f028e6d7987351e1085cfb1386c781c60c6e8ff5ec6e670b8fd05 failed: ciphertext verification failed unexpected pack id 96ca08d988dabf56cb6c696cac918a81a990d6beec7f1c4f95013637cdc5a49f]
[6:25:08] 100.00% 44585 / 44585 packs

The repository contains damaged pack files. These damaged files must be removed to repair the repository. This can be done using the following commands. Please read the troubleshooting guide at Troubleshooting — restic 0.20.0 documentation first.

$ restic repair packs 5a2a46ab693f028e6d7987351e1085cfb1386c781c60c6e8ff5ec6e670b8fd05 -r VollBackUp
[0:07] 100.00% 17 / 17 index files loaded
saving backup copies of pack files to current folder
salvaging intact data from specified pack files
failed to load blob 1101a787a1f2192c0f56af6130985fb0baec6f7dbd64826723cd2fcee8a77a24: decrypting blob <data/1101a787> from pack 5a2a46ab693f028e6d7987351e1085cfb1386c781c60c6e8ff5ec6e670b8fd05 failed: ciphertext verification failed

restic check -r VollBackUp
[0:00] 100.00% 16 / 16 index files loaded
check all packs
check snapshots, trees and blobs
error: failed to load snapshot f27889d6: LoadRaw(<snapshot/f27889d6c1>): invalid data returned
[0:01] 100.00% 15 / 15 snapshots

After some more search it occurred to me to repair my file-system:

$ sudo fsck /dev/sda
fsck from util-linux 2.42.4
e2fsck 1.47.4 (6-Mar-2025)
/dev/sda contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda: 45684/30531584 files (93.5% non-contiguous), 103470990/122096645 blocks

As far as I can tell this did not solve my issue:

$ restic check -r VollBackUp
error: failed to load snapshot f27889d6: LoadRaw(<snapshot/f27889d6c1>): invalid data returned
[0:43] 100.00% 15 / 15 snapshots

Fatal: repository contains errors

Furthermore, I ran smartmontools on the ssd the backup is on, these are the results:

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: “Execute SMART Short self-test routine immediately in off-line mode”.
Drive command “Execute SMART Short self-test routine immediately in off-line mode” successful.
Testing has begun.
$ sudo smartctl -H /dev/sda
smartctl 7.5 2025-04-30 r5714 [x86_64-linux-7.2.9-1-MANJARO] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
Warning: This result is based on an Attribute check.
Failed Attributes:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 001 001 050 Pre-fail Always FAILING_NOW 16376

I have since copied the drive using ddrescue but since this post is rather long as it it I will expand on that on request.
This post has become quite text-wally, I hope it contains useful context.

Any help is greatly appreciated,
Aaron

Hm sure looks like a hardware problem. The first thing I would do: make a fresh backup of your live data to another drive. You know, Murphys Law says that right when your backup drive spins its final turn, it’ll inspire your data drive to do the same.

Not sure what then but maybe instead of dd’ing the failing drive, maybe try rsyncing what’s left of the repo?

Hi,

thanks for the quick reply and helping me out :slight_smile:
I already did do a backup today.

How would rsyncing my repo help? I am not quite sure if the repo is recoverable afterwards. I am open to losing some of the snapshots, I don´t mind gaps in the records, they are somewhat randomly distributed anyway. I am fairly certain that my drive could survive a couple more readings, it survived a couple hours of sustained reading a few times now. (But of course I would rather not tempt fate therefore I should proceed with caution and do as little reading as possible) If all else fails I already copied all the data into an image, but I am having trouble with the partition table of this data.

Have a nice day,
Aaron

I thought maybe then you’d have a repo where all packs that were copied might be okay - as opposed to the dd copy where you just have all bits that were okay. But it probably doesn’t make a big difference.