$ restic version
restic 0.12.1 compiled with go1.18.1 on linux/amd64
I created my first repo, and my first backup and then went to check it and I have errors:
$ restic check --read-data
using temporary cache in /tmp/restic-check-cache-1184318993
repository a0f8357f opened successfully, password is correct
created new cache in /tmp/restic-check-cache-1184318993
create exclusive lock for repository
load indexes
check all packs
check snapshots, trees and blobs
read all data 0 / 1 snapshots
[0:09] 100.00% 1 / 1 snapshots
pack d389242a contains 1 errors: [blob 3: ciphertext verification failed]
Pack ID does not match, want 14ef9704, got 00d7ee48
Pack ID does not match, want 88f59510, got 1e34cd93
pack 97db1273 contains 1 errors: [blob 1: ciphertext verification failed]
Pack ID does not match, want 6236928f, got 8c7546e1
pack 26a5b20a contains 1 errors: [blob 3: ciphertext verification failed]
Pack ID does not match, want 7d288ebc, got 255ea245
[19:09] 100.00% 12349 / 12349 packs
Fatal: repository contains errors
alas I can’t even prune it:
repository a0f8357f opened successfully, password is correct
loading indexes...
loading all snapshots...
finding data that is still in use for 1 snapshots
[0:01] 0.00% 0 / 1 snapshots
decrypting blob 12ef69011c31fc9a5550b51f95bf4c46745e676a6643d1f622281e2ed6eb3757 failed: ciphertext verification failed
github.com/restic/restic/internal/repository.(*Repository).LoadBlob
github.com/restic/restic/internal/repository/repository.go:204
github.com/restic/restic/internal/repository.(*Repository).LoadTree
github.com/restic/restic/internal/repository/repository.go:728
github.com/restic/restic/internal/restic.loadTreeWorker
github.com/restic/restic/internal/restic/tree_stream.go:37
github.com/restic/restic/internal/restic.StreamTrees.func1
github.com/restic/restic/internal/restic/tree_stream.go:164
golang.org/x/sync/errgroup.(*Group).Go.func1
golang.org/x/sync/errgroup/errgroup.go:57
runtime.goexit
runtime/asm_amd64.s:1571
I’m tempted to blow away the repo, re init and take a backup anew. But part of me much prefers to understand what happened here, and ideally how to fix it should such a thing happen in future.
To wit, I am happy to follow any further diagnostic advice should it be forthcoming and express my gratitude for that.
Why are you using a restic version that is so old?
I mean it should work, but there’s compression and other good things in later version of restic, you really should upgrade.
I just ran apt install restic on Ubuntu 22.04 is all. Am happy to install a later .deb if there is one. I’m actually working with it on a solid backup before I do a dist-upgrade and more to bring a server up to date I guess.
Looks like there are lot of builds and it’s the restic_0.18.0_linux_386.bz2 bulild I need which contains a single binary.
$ ./restic_0.18.0_linux_386 version
restic 0.18.0 compiled with go1.24.1 on linux/386
Given there was a package, I’ll just move that to /usr/bin/restic. I have a 0-.12 backup running. When that’s done if it again checks badly I’ll try upgrading to 0.18 and going again. Which I may do regardless just to up to date.
You can usually do “restic self-update” (as root/sudo) as well, though I don’t know if it works on that really old version you’ve got. That updates the binary. The only “problem” then is the version shown in apt isn’t the true version you’re running.
So it’s the restic_0.18.0_linux_amd64 I’ll need. I am puzzled why there’s an need to unistall it with apt given it’s a single binary and all apt installs onm top of that is docs, man pages and a bash completions file:
I suggest you do some reading about Linux packages At the end this is your system and you can do what you want. This is irrelevant for your issue and does not belong to this forum anyway.
PS. If you need nicely packaged restic then I suggest rpm - I do not know if anybody maintains deb packages with latest restic. Installing rpm on Ubuntu requires a bit of Google.
Thanks. alien is the tool it seems for converting rpm to deb and installing in Ubuntu.
Out of interest, why the seemingly cynical: “I suggest you do some reading about Linux packages”? What would I learn? apt-file shows the contents of a package. And sure I’ve read this: Chapter 7. Basics of the Debian package management system but it’s a tough game second guessing what snippet of wisdom you might be alluding to?
It is nice to know that a clean install of an rpm is possible though. Thanks for that.
It’s not that I need a nicely installed package, I’m not fussed really. The binary alone is fine. Am running a test backup now with 0.18. It’s a large backup 114GB in size, and takes a while.
On the whole restic looks awesome! Reasonably turnkey and easy. Just a bit puzzled that my first backup effort produced a corrupt backup and that I only noticed when trying get stats from it. Will certainly being a good check before trusting one into the future.
Sorry if it sounded like that. Was not my intention. Simply I mean that if you want to mess with your distro packages you are on your own. Nothing to do with restic and this forum. On the plus side it is very good way to learn a bit more. Especially when you break your system and have to repair it:)
For anybody using Linux distros with pathetically outdated and not maintained software packages (restic 12.1 is from 2021…) I suggest to look at this project:
which allows to install and maintain the latest software versions for many popular programs.
The backup is hanging now around 82%. So doing it with -vn to see what happens.
There may indeed be issues with the system. The real question is how to diagnose the causes. The first observation (0.12) was a successful backup, a passed check, and failed check --read-data. The second observation is backup hanging at around 82% progress bar still racing (time going up, but not progress and no files listed).
So I ran fsck on the whole system and all is good. Now I’m doing a RAM test and it’s slow as but found 16 errors (using pcmemtest but will get the latest Memtest86+ later and try again. Could be that RAM issues contribute. Fascinating that the system is running, stable and happy and only restic seems to hang and only on a large backup (I do smaller ones and it works)
Because not every error leads to system crash… All depends on workload but given simple probability typically what you will observe is silent data corruption (there is much more data processed than executable code in typical system). Without ECC RAM and filesystem with checksums (ZFS, BTRFS..) you simply do not know about it. Restic checks every bit of data hence it often identifies issues users are not aware of. In other words restic is not happy about any “flipped” bit. Most other programs simply do not care.