Hello,
So I have been running restic with rclone since 2020. My cloud storage just ran out of space and when I investigated, it was one of my restic backups.
Looking at the snapshots of the backup, I found that it had 108 snapshots instead of the ~23 I was expecting (I run backups every day followed by restic -r rclone:backup_place --password-file secrets forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune
) (a problem, but not on my priority list atm).
List of snapshot
# restic -r rclone:backup_place --password-file secrets snapshots -c repository 937d3623 opened (version 1) ID Time Host Tags --------------------------------------------------------- 5064a50e 2020-02-17 06:58:29 host 277ae795 2020-02-20 13:42:42 host 8051fb6b 2020-02-22 02:00:02 host f35e6b21 2020-02-29 02:00:02 host 571c37d2 2020-03-31 02:00:01 host 77aa384f 2020-04-30 02:00:01 host f4b490e1 2020-05-03 02:00:01 host d139a08f 2020-05-10 02:00:02 host b02e2ef0 2020-05-17 02:00:01 host baf82a16 2020-05-18 02:00:01 host ba26f522 2020-05-19 02:00:01 host c9cc8131 2020-05-20 02:00:01 host 0c399f09 2020-05-21 02:00:01 host c7e91c82 2020-05-22 02:00:01 host 3d740f37 2020-05-23 02:00:01 host 2b2546fe 2020-05-23 13:46:08 host a812e0dc 2020-05-23 19:41:01 host b0bf4a46 2020-05-24 11:01:26 host b1940e13 2020-05-31 02:00:01 host a6b1563f 2020-06-02 02:00:01 host 46da7773 2020-06-03 02:00:01 host c37da64d 2020-06-04 02:00:01 host e2f4209f 2020-06-05 02:00:01 host a9389097 2020-06-06 02:00:01 host bda01d2d 2020-06-07 02:00:01 host 1a3942b4 2020-06-08 02:00:01 host dc28cf73 2020-06-08 19:15:36 host-1 1441f60c 2020-07-26 02:00:01 host-1 b40e1427 2020-07-31 02:00:01 host-1 b3251552 2020-08-02 02:00:02 host-1 417d8ec0 2020-08-09 02:00:01 host-1 a347ee21 2020-08-10 02:00:02 host-1 58dc2a89 2020-08-11 02:00:01 host-1 aa8db2bf 2020-08-12 02:00:01 host-1 f9e7f1a8 2020-08-13 02:00:01 host-1 d5d3c1e1 2020-08-14 02:00:01 host-1 03845ee6 2020-08-15 02:00:01 host-1 3f9ec694 2020-08-16 02:00:01 host-1 b0ad66b0 2020-08-31 02:00:01 host-1 5a742655 2020-09-27 02:00:01 host-1 f6d527aa 2020-09-30 02:00:01 host-1 52e24d7f 2020-10-04 02:00:01 host-1 bd08b444 2020-10-08 02:00:02 host-1 bd8ad871 2020-10-09 02:00:01 host-1 3b82dadf 2020-10-10 02:00:01 host-1 c4db262e 2020-10-11 02:00:02 host-1 26dc5f01 2020-10-12 02:00:02 host-1 94e282b5 2020-10-13 02:00:02 host-1 0c5055c4 2020-10-14 02:00:01 host-1 14ba5b42 2020-10-15 02:00:01 host-2 8c990e44 2020-10-16 02:00:01 host-2 f24ce9a0 2020-10-18 02:00:02 host-2 d7655464 2020-10-22 02:00:02 host-2 bfa1a511 2020-10-23 02:00:01 host-2 2b6e979f 2020-10-24 02:00:01 host-2 8ace9f58 2020-10-25 02:00:01 host-2 7a5f5ce8 2020-10-26 02:00:02 host-2 42138638 2020-10-27 02:00:01 host-2 03afd310 2020-10-28 02:00:02 host-2 4002ad05 2020-10-31 02:00:01 host-2 d77868af 2020-11-30 02:00:01 host-2 a83fcfe5 2020-12-31 02:00:01 host-2 05125346 2021-01-03 02:00:01 host-2 97395050 2021-01-10 02:00:01 host-2 d787513d 2021-01-17 02:00:01 host-2 8e22cf19 2021-01-18 02:00:01 host-2 5024af70 2021-01-19 02:00:01 host-2 165adea1 2021-01-20 02:00:01 host-2 4cd08e8f 2021-01-21 02:00:01 host-2 4d24107b 2021-01-22 02:00:01 host-2 9d5c42d4 2021-01-23 02:00:02 host-2 a60cb254 2021-01-24 02:00:01 host-2 88291c51 2021-01-25 02:00:02 host-2 3bcf7f87 2021-01-26 02:00:01 host-2 b16a7a6c 2021-01-27 02:00:01 host-2 4fd7a3d5 2021-01-28 02:00:01 host-2 c7f555cb 2021-01-29 02:00:02 host-2 e9ed4952 2021-01-30 02:00:01 host-2 435928ef 2021-01-31 02:00:02 host-2 190afbcd 2021-02-07 02:00:02 host-2 4d4b1f8b 2021-02-08 02:00:01 host-2 0b6fc5e6 2021-02-09 02:00:01 host-2 bd37c95c 2021-02-10 02:00:01 host-2 1dbfba8b 2021-02-11 02:00:01 host-2 63a4eab6 2021-02-12 02:00:01 host-2 f57622d9 2021-02-13 02:00:01 host-2 26f4be4e 2022-04-12 02:00:01 host-2 3196c702 2022-05-31 02:00:01 host-2 dc59340d 2022-06-30 02:00:02 host-2 a72064e4 2022-07-31 02:00:02 host-2 c20740df 2022-08-31 02:00:02 host-2 913485de 2022-09-30 02:00:01 host-2 46189ae3 2022-10-31 02:00:01 host-2 29bb5576 2022-11-29 02:00:01 host-2 868e0491 2022-12-31 02:00:01 host-2 d8945885 2023-01-31 02:00:01 host-2 db1348b4 2023-02-28 02:00:02 host-2 62fbe7c5 2023-03-12 02:00:01 host-2 c58366d2 2023-03-19 02:00:01 host-2 b0bfc913 2023-03-21 02:00:01 host-2 ec48177e 2023-03-22 02:00:01 host-2 0c96aecd 2023-03-23 02:00:02 host-2 191898f7 2023-03-24 02:00:02 host-2 b4e9360f 2023-03-25 02:00:01 host-2 1890f22d 2023-03-26 02:00:01 host-2 5adc0b88 2023-03-27 02:00:01 host-2 --------------------------------------------------------- 106 snapshots
After clearing some space on the cloud storage, I was able to get restic manually forget the excess snapshots. However, when I run restic -r rclone:backup_place --password-file secrets prune
, it now errors:
prune error
# restic -r rclone:backup_place --password-file secrets prune repository 937d3623 opened (version 1) loading indexes... loading all snapshots... finding data that is still in use for 20 snapshots Load(, 391, 18805) returned error, retrying after 720.254544ms: EOF Load(, 391, 18805) returned error, retrying after 873.42004ms: EOF Load(, 391, 18805) returned error, retrying after 1.054928461s: EOF Load(, 391, 18805) returned error, retrying after 1.560325776s: EOF Load(, 391, 18805) returned error, retrying after 3.004145903s: EOF Load(, 391, 18805) returned error, retrying after 2.147653057s: EOF Load(, 391, 18805) returned error, retrying after 3.739082318s: EOF Load(, 391, 18805) returned error, retrying after 5.099891944s: EOF Load(, 391, 18805) returned error, retrying after 10.263247495s: EOF Load(, 391, 18805) returned error, retrying after 19.514091959s: EOF [1:14] 100.00% 20 / 20 snapshots EOF ReadFull() github.com/restic/restic/internal/backend.ReadAt /restic/internal/backend/readerat.go:39 github.com/restic/restic/internal/repository.(*Repository).LoadBlob /restic/internal/repository/repository.go:298 github.com/restic/restic/internal/restic.LoadTree /restic/internal/restic/tree.go:113 github.com/restic/restic/internal/restic.loadTreeWorker /restic/internal/restic/tree_stream.go:36 github.com/restic/restic/internal/restic.StreamTrees.func1 /restic/internal/restic/tree_stream.go:176 golang.org/x/sync/errgroup.(*Group).Go.func1 /home/build/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1594
Running restic -r rclone:backup_place --password-file secrets check
results in lots of non-referenced packs, some incorrectly sized packs and the same error when it starts checking the snapshots.
end of check output
704 additional files were found in the repo, which likely contain duplicate data. This is non-critical, you can run `restic prune` to correct this. check snapshots, trees and blobs Load(, 391, 18805) returned error, retrying after 720.254544ms: EOF Load(, 391, 18805) returned error, retrying after 873.42004ms: EOF Load(, 391, 18805) returned error, retrying after 1.054928461s: EOF Load(, 391, 18805) returned error, retrying after 1.560325776s: EOF Load(, 391, 18805) returned error, retrying after 3.004145903s: EOF Load(, 391, 18805) returned error, retrying after 2.147653057s: EOF Load(, 391, 18805) returned error, retrying after 3.739082318s: EOF Load(, 391, 18805) returned error, retrying after 5.099891944s: EOF Load(, 391, 18805) returned error, retrying after 10.263247495s: EOF Load(, 391, 18805) returned error, retrying after 19.514091959s: EOF error for tree fad85238: [3:11] 100.00% 20 / 20 snapshots ReadFull(): EOF Fatal: repository contains errors
Any ideas on how to fix this and recover the backups?
Thanks.