Hello,
is there any way to limit the check command to check the last x snapshots?
Hello,
is there any way to limit the check command to check the last x snapshots?
No, sorry. The check command doesn’t have any filtering flags (see restic help check).
Can you describe your use case more? I’m just curious why you need to limit the check.
I have ab bunch of laptops, which I backup with restic.
After the backup I check wish to check my last x backups.
The reason is to save time and bandwidth.
I don’t think you need to check --read-data after every single backup. If you need that, you have some serious problem with your repository storage ![]()
Restic does a lot of work to make sure that data was indeed saved in the repository, so if you have a normal functioning infrastructure you can run check less often.
You might want to take a look at this discussion too.
hello, to all, is there a solution to this problem yet or an example script?
rclone check --lastest-snapshot
or
rclone check --read-data --snapshot_id=e57150fe
AFAIK, restic check only supports to check the complete repository or to filter snapshots by host, path or tag. So, you could tag the snapshots-to-check with a unique tag and then use restic check --tag <MYTAG> to check exactly those.
Alternatively, you can use rustic (note: I’m the maintainer) which allows you to use more filtering or snapshots by id, e.g.
rustic check latest
rustic check latest latest~1
rustic check --read-data e57150fe
rustic check --read-data --filter-host my_host --group-by '' --filter-latest 20