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.

  • miaowoo_lw@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    5 hours ago

    The useful split isn’t by time, it’s by data class — your “churn that isn’t real data” observation is the key:

    Separate repositories for real data vs. app state. Databases, logs, container images, caches in one repo with aggressive expiry; documents, photos, configs in another with long retention. Then “how long” becomes easy per class instead of one uncomfortable compromise.

    For the churn class, a sane baseline with restic:

    restic forget --prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --keep-yearly 2
    

    Reasoning: most restores are “it broke today/yesterday” — dailies cover those. Weekly+monthly exist for “the corruption was already there and I didn’t notice” (ransomware, a bad deploy 5 weeks ago, silently-degraded RAID). Yearly is only worth it for truly irreplaceable data.

    Two things worth checking on the borgbase side:

    1. Prune actually runs — restic forget without --prune (or borg prune vs borg delete semantics) marks snapshots but never frees repo space. Plenty of people run forget for years and wonder why the repo is full.
    2. Restore tests, not just snapshots — quarterly, restore into a scratch VM. A backup that’s never been restored is a hypothesis.

    “Keep forever” mostly comes from cheap snapshot storage, but with churn-heavy data old daily snapshots are exactly where dedup saves you the least — the churn is your storage cost there.