this post was submitted on 25 Mar 2025
29 points (96.8% liked)

Selfhosted

45381 readers
516 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I am quite worried about losing information and not being able to recover it from the backups, so I am trying to nail the best automated way to make sure the backups are good.

Restic comes with a check command, that according to the documentation here has this two "levels":

  • Structural consistency and integrity, e.g. snapshots, trees and pack files (default)
  • Integrity of the actual data that you backed up

In plain words, I understand this as: The data you uploaded to the repository is still that data.

Now my question is, do you think this is enough to trust the backups are right? I was thinking about restoring the backup in a temporary location and running diff on random files to check the files match the source, but I don't know if this is redundant now.

How do you make sure you can trust your backups?

you are viewing a single comment's thread
view the rest of the comments
[–] irotsoma@lemmy.blahaj.zone 1 points 1 week ago

Depends on what you're backing up. Is it configs for applications, images, video, etc? If it's application configs, you can set up those applications in a virtual machine and have a process run that starts the machine, restores the configs, and makes sure the applications start or whatever other tests you want. There are applications for doing that.

If it's images or videos, you can create a script to randomly pick a few, restore them, and check the integrity of the files. Usually just a check of the file header (first few bytes of the file) will tell you if it's an image or video type of file and maybe a check on the file size to make sure it's not an unreasonably small size, like a video that's only 100 bytes or something.

All this seems like overkill though in most scenarios.