Restic no longer working "Fatal: Fatal: config cannot be loaded: unsupported repository version"

Hi Everyone,

I have been using restic to back up my system (running 22.04.5) without issue until this week, when I get the following error: “Fatal: Fatal: config cannot be loaded: unsupported repository version”.

I haven’t knowingly changed anything on my system. My initial search indicated that this is due to restic not being upgraded, but if I try and upgrade restic I get: “restic is already the newest version (0.12.1-2ubuntu0.3).”

Does anyone know how to solve this, please?

This is ongoing - anyone have a solution?

I’m not sure but I’ve seen many people using different versions
Please show

restic version all

Maybe this also

restic cat --repo ... --verbose config

Mine just works, for just a short example:

sudo restic -r /tmp/restic-repo backup /etc
[sudo] password for me:               
enter password for repository: 
repository e6643b68 opened (version 2, compression level auto)
created new cache in /root/.cache/restic
using parent snapshot ab107efa


Files:          36 new,     0 changed,  3186 unmodified
Dirs:           15 new,    11 changed,   426 unmodified
Added to the repository: 167.388 KiB (46.785 KiB stored)

processed 3222 files, 10.835 MiB in 0:00
snapshot 4ac10bce saved

cd /tmp/restic-repo/snapshots && ls
4ac10bced7a4beb95d6d20e35b6ebc3c1bbdadd81f7438304cc6967d3542d57f
ab107efa31654ff5c8a3ad2c44f9b26da3d5760dd9798c22b622ea12884bf

Hi, thanks for replying!

restic version all

gives:

restic 0.12.1 compiled with go1.18.1 on linux/amd64

And

restic cat --repo … --verbose config

gives:

Fatal: unable to open config file: stat …/config: no such file or directory
Is there a repository at the following location?

I can’t remember which version is needed for V2
Mine currently is:

 restic version
restic 0.16.4 compiled with go1.22.2 on linux/amd64

I feel this would be better at the restic forum: https://forum.restic.net/
Good Luck I wish I could could help you better. :slight_smile:
And Welcome to Discourse

I do not see a firm answer to the question in your output, so let’s ask again:
Is there a config file at that location?
If so, is it a valid config file, or is it corrupted?

Thank you, so it seems there is a new version of restic, but the Ubuntu repository isn’t updated?

The restic forum website seems to be down, unfortunately.

Thank you! Unfortunately it doesn’t show the full path, only …/config - how can I find it?

have you set or exported the RESTIC_REPOSITORY (and possibly RESTIC_PASSWORD) environment variables so it knows where to look ?

1 Like

I have no idea how or where you created your Back-up Repo.
Try checking your .bash_history for any clues.

I created my Repo in this Directory (local)

ls /backup/restic/config && ls config
/backup/restic/config
config

It’s owned by root

/backup/restic🔒 
└─> stat config
  File: config
  Size: 155       	Blocks: 8          IO Block: 4096   regular file
Device: 252,0	Inode: 19661065    Links: 1
Access: (0400/-r--------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-12-22 11:22:11.853538545 -0700
Modify: 2024-12-22 11:21:18.184693950 -0700
Change: 2024-12-22 11:21:18.204693520 -0700
 Birth: 2024-12-22 11:21:18.184693950 -0700

If your password has been changed or forgotten then more steps will be needed.

have you set or exported the RESTIC_REPOSITORY (and possibly RESTIC_PASSWORD) environment variables so it knows where to look ?

Yes, I had been using it for over a year, and it was working fine until a few weeks ago.

so if you check where that RESTIC_REPOSITORY variable points to right now, is there a file called “config” in there ?

Oh, I see - I have two separate backups, both of which stopped working at the same time with the above error message. RESTIC_REPOSITORY for each points to a Backblaze bucket. There is a config file in each.

The same thing has happened to me as well…

Same version of Ubuntu:

➜  ~ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.5 LTS"

Same error message:

➜  ~ restic -r my-repository stats
Fatal: Fatal: config cannot be loaded: unsupported repository version

Same version of restic:

➜  ~ restic version
restic 0.12.1 compiled with go1.18.1 on linux/amd64

I installed and configured restic on multiple machines at the same time, one of those via ansible, and looking back at the config history I can see that I installed 0.16.1, which must have been the latest version at the time.

I can still query the repository from that machine, and it reports (version 2, compression level auto).

According to the changelog, compression was added to restic in 0.14.0 and introduced version 2 of the repository format. So I must have originally had a version between 0.14.0 and 0.16.1.

I searched through my ~/.zsh_history and can see that I installed restic via apt, then immediately ran a self-update:

sudo apt install restic
sudo restic self-update

I then searched my /var/log/apt/history.log files for restic:

Start-Date: 2024-11-22  13:08:13
Requested-By: me (1000)
Install: …
Upgrade: … restic:amd64 (0.12.1-2ubuntu0.2, 0.12.1-2ubuntu0.3) …
End-Date: 2024-11-22  13:14:46

It turns out my last automated snapshot was taken the day before on 2024-11-21, so this update probably broke things.

I’m assuming that version 0.12.1-2ubuntu0.3 was released on the Ubuntu repo and overwrote the version installed by running sudo restic self-update. The newly downgraded version could then no longer access the (now) unsupported repository.

I have since uninstalled restic via apt and manually installed it using the release from GitHub to prevent this happening again.

1 Like

Thank you! This is extremely helpful, and good to know someone else was affected. I will try uninstalling and re-installing via GitHub to see if that fixes things.

This has now been resolved. For anyone else coming across this, I uninstalled the version of restic I had, and then installed a newer version:

snap install restic --channel=latest/edge --classic

After this, my backup scripts, etc, worked again as normal.