> ## Content Index
> Fetch the complete content index at: https://logbuch-homelab.nichedthemes.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# restic check reads a twentieth of the backups every Saturday
- URL: https://logbuch-homelab.nichedthemes.com/restic-check-every-saturday/
- Published: 2026-11-11T18:00:00.000Z
- Updated: 2026-11-11T18:00:00.000Z
- Description: Since the backup incident the weekly check reads part of the stored data back and compares it with its checksums. Twenty Saturdays read all of it.
- Author: Tomasz Wieland
- Tags: Homelab, Backups, #video-header, #Import 2026-11-19 07:37

0:00 

/0:06 

1× 

The first run on the NAS, reading 5 % of the packs. The clip loops.

Every Saturday at 07:00 the NAS runs `restic check --read-data-subset`, which reads part of the stored data back and compares it with its checksums. Until last week my weekly check was a look at `restic snapshots`. That shows a snapshot exists, and says nothing about whether it can be restored.

## Five percent, or one part in twenty

The clip shows the first run, with `5%`. That picks packs at random, so some are read twice before others are read at all. `n/20` reads the n-th of twenty fixed parts instead, and with the week number as n, twenty Saturdays read every pack once.

```bash
#!/usr/bin/env bash
set -euo pipefail

part=$(( 10#$(date +%V) % 20 + 1 ))
restic -r /srv/restic check --read-data-subset "${part}/20"
```

`10#` keeps bash from reading week `08` as an octal number. It takes 14 minutes on the NAS, at an hour when nothing else runs.