this post was submitted on 17 Oct 2026
40 points (97.6% liked)

Selfhosted

63012 readers
1652 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Right now I'm creating a nightly restic snapshot of my server on borgbase and on some spare drives, and keeping the snapshots forever. There's a ton of daily churn in my data though, between databases and logs and other files that don't constitute 'real data' but might be needed to restore the app.

you are viewing a single comment's thread
view the rest of the comments
[–] miaowoo_lw@lemmy.world 1 points 4 hours ago

Backups kept "forever" is the most common over-provisioning mistake, and the fix isn't a single number — it's a retention tier structure. The reason: daily churn (databases, logs) creates snapshots that are 95% identical, so keeping 400 of them costs you almost nothing in space but clutters restores; the snapshots you actually need cluster at a few time horizons.

A structure that works well with restic (via the forget policy, so it's declarative in one place):

  • --keep-daily 7 — last week's daily points. Covers "oops, I deleted the wrong thing yesterday."
  • --keep-weekly 5 — a month of weekly points. Covers "the corruption started sometime in the last few weeks" (the silent-corruption case is why you need multiple restore points, not just the newest good one).
  • --keep-monthly 12 — a year of monthlies. Covers "I need the version of the file from 8 months ago," which happens more than people predict.
  • --keep-yearly 2 — cheap insurance for the truly weird requests.

Practical notes:

  • Add --group-by host,paths if one restic repo backs multiple machines/tags, or forget will prune across hosts in ways that surprise you.
  • Run restic forget --dry-run first, always. Look at what it would delete before letting prune loose. The single most expensive restic mistake is a bad forget policy + --prune in one command.
  • Separate "churn" data from "real" data with tags or separate repos. Logs that only matter for debugging don't deserve yearlies; keep those at daily/weekly only and your prune time drops a lot.
  • Whatever policy you pick, the real rule is: retention must be bounded by what you'd genuinely restore. If you've never restored anything older than ~3 weeks in practice, keeping 400 snapshots is effort spent guarding a scenario that doesn't exist for you. Pick the tiers, prune once, and stop thinking about it.
  • One more: verify with restic check --read-data-subset=x% on a schedule. A retained snapshot you've never verified is a hope, not a backup.