Home Assistant Backup Checksum or Integrity Check

I’ve had a few cases now where I’ve had a critical failure of my microsd or home assistant installation where i was able to access my backup from the local microsd card OR my google drive backup. That would sound like good news —> only to find that one of the tar files within the backup was corrupted.

Is anyone knowledgeable in .tar file generation able to come up with a scheme where after a backup is created, each underlying tar file has a reported checksum or integrity check so the user can know before an attempted recovery that each underlying .tar file within the backup isn’t corrupted?

I’ve done a little bit of analysis and I’ve found the most common tar with corruption is the media tar – but I have found other tar files can be corrupt also. (My remedy to still recover my backup was to simply disregard the corrupt “sub-tar” and pull a non corrupt one from “another” backup).

In summary: Hopefully none of you have experienced this before, but I think it would be a great feature that upon completion of any backup -

Here are the stories I would ask our development community to consider from the user perspective:

1.Upon completing a backup, home assistant looks at the completed backup, and at the very least attempts to “Re-open it” to check for corruption. If the re-open fails - flag for the user in the notification panel.
2. In the ideal, it would be great if we could highlight for each .sub-tar file within the backup, which one may be corrupt etc.
3. Re-attempt a backup upon a failure.

Thanks to all of you who contribute to this project.