Restic and pCloud - repository contains damaged pack files

Hi, I did a restic backup (using rclone backend) of my external HDD that contains more than 3TB of data (documents, pictures, large ISOs, large videos, …) to pCloud. Overall, this backup took about a day and finished successfully, although there were some connection issues and I had to cancel and (re)start the backup at one point because the HDD was running very hot. The backup finished successfully. After doing a repo check I got the damaged pack files error and I don’t know how to resolve this.

[user@myserver ~]$ restic version
restic 0.19.1 compiled with go1.26.4-X:nodwarf5 on linux/amd64

[user@myserver ~]$ rclone version
rclone v1.75.0
- os/version: arch (64 bit)
- os/kernel: 7.1.5-zen1-2-zen (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.5-X:nodwarf5
- go/linking: dynamic
- go/tags: none
-----------------------------------------------------------------

[user@myserver ~]$ restic -r rclone:pcloud:myBackup/hdd-repo check
using temporary cache in /tmp/restic-check-cache-3553530402
create exclusive lock for repository
enter password for repository: 
repository 99fe04c8 opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-3553530402
load indexes
[1:20] 100.00%  121 / 121 index files loaded
check all packs
pack a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d: unexpected file size: got 196608, expected 18202795
check snapshots, trees and blobs
[0:08] 100.00%  1 / 1 snapshots

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 https://restic.readthedocs.io/en/stable/077_troubleshooting.html first.

restic repair packs a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d
restic repair snapshots --forget

Damaged pack files can be caused by backend problems, hardware problems or bugs in restic. Please open an issue at https://github.com/restic/restic/issues/new/choose for further troubleshooting!
Fatal: repository contains errors


[user@myserver ~]$ restic -r rclone:pcloud:myBackup/hdd-repo repair packs a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d
enter password for repository: 
repository 99fe04c8 opened (version 2, compression level auto)
[0:09] 100.00%  121 / 121 index files loaded
saving backup copies of pack files to current folder
open pack-a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d: file exists

[user@myserver ~]$ restic -r rclone:pcloud:myBackup/hdd-repo repair snapshots --forget
enter password for repository: 
repository 99fe04c8 opened (version 2, compression level auto)
[0:00] 100.00%  121 / 121 index files loaded

snapshot 40a635e4 of [/run/media/user/BIGBACKUP] at 2026-07-31 08:03:56.854553939 +0100 CEST by user@myserver

no snapshots were modified

[user@myserver ~]$ restic -r rclone:pcloud:myBackup/hdd-repo check
using temporary cache in /tmp/restic-check-cache-3195024499
create exclusive lock for repository
enter password for repository: 
repository 99fe04c8 opened (version 2, compression level auto)
created new cache in /tmp/restic-check-cache-3195024499
load indexes
[2:24] 100.00%  121 / 121 index files loaded
check all packs
pack a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d: unexpected file size: got 196608, expected 18202795
check snapshots, trees and blobs
[1:14] 100.00%  1 / 1 snapshots

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 https://restic.readthedocs.io/en/stable/077_troubleshooting.html first.

restic repair packs a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d
restic repair snapshots --forget

Damaged pack files can be caused by backend problems, hardware problems or bugs in restic. Please open an issue at https://github.com/restic/restic/issues/new/choose for further troubleshooting!
Fatal: repository contains errors

This to me suggests that restic’s attempt to back up the pack file that it is about to delete in the repository failed, because there is already a file named pack-a84eef14f3c055790f953d46f8441c1a7a096561a7b07b2422be0db598e3b98d in the current directory.

If that is the case, remove that local copy of the file and let restic save it, then hopefully restic can perform the repair as it intends. In other words, remove (or rename) that local copy of the file, then run the two repair commands again.

Yes, you are right. I don’t know how that happened but I had a copy of that pack file on my local server. I deleted the pack file and after a new recheck everything seems to be OK.

Thank you very much!

Very nice! Glad to hear that :slight_smile: