backshots

Kubernetes-native backups that land on your NAS as deduplicated restic repositories. No keys, no S3, no backup service to run.

dedup, no keysapp-consistent databasesrestores that are tested

Install

# add the chart repository
helm repo add backshots https://willuhmjs.github.io/backshots
helm repo update

# install the operator and point it at your NFS export
helm install backshots backshots/backshots -n backshots-system --create-namespace \
  --set store.create=true \
  --set store.nfs.server=192.168.1.5 \
  --set store.nfs.path=/volume1/k8s-backup

Back up an app in one manifest

apiVersion: backshots.io/v1alpha1
kind: BackupPolicy
metadata: {name: gitea-db, namespace: gitea}
spec:
  storeRef: default
  schedule: "0 * * * *"            # hourly
  source:
    type: postgres
    postgres:
      image: postgres:16            # pg_dump always matches your server
      host: postgres.gitea.svc
      passwordSecretRef: {name: postgres, key: password}
  verify:                          # restore it somewhere safe, prove it works
    schedule: "0 4 * * 0"
    database: gitea
    sql: ["select count(*) > 100 from repository"]
$ kubectl get backuppolicies -A      # example output
NAMESPACE   NAME        TYPE       SCHEDULE    LAST   SNAPSHOTS   VERIFIED   HEALTHY
gitea       gitea-db    postgres   0 * * * *   4m     26          true       True
gitea       gitea-data  files      0 3 * * *   9h     14          true       True

What you get on the NAS

gitea/gitea-db/restic/                          # one restic repository per policy, plain local backend
gitea/gitea-db/restic/data/...                  # content-addressed packs: where the space goes
gitea/gitea-data/restic/                        # the same, for the files
# recovery by hand, with the restic binary that ships in the mover image
restic -r gitea/gitea-data/restic --insecure-no-password restore latest --target ./recovered

Each repository is deduplicated: a changed 10 GiB file costs its changed chunks, not a fresh copy, and database dumps dedup across runs too — status reports the bytes actually added, so you can watch it work. The honest cost: the folders are restic packs, not files to browse — individual files come back with restic ls and restic dump, or a Restore. If the operator vanished tomorrow you would still restore with any restic binary.

Why it is different

Deduplicated history

Backups are restic repositories on your export. A changed 10 GiB file costs its changed chunks, sqlite copies and pg_dump dumps dedup across runs, so retention stays affordable on a home NAS.

No service, no keys

Plain local backend: no rest-server, no object store, nothing listening on a port. Unencrypted by design — the NFS export's ACL is the security boundary, so there is no key to lose.

Consistent databases

pg_dump and SQLite's online backup, run in your own database image so versions always match. Not a hot copy of data files.

Proven restorable

Verify jobs run restic check plus a rotating read of the whole repository within ten weeks, load your dumps into a scratch database and run your SQL assertions. A backup you never restored is a guess.

Restores you can kubectl

Apply a Restore. It checks inputs first, stops your app, restores, starts it again, and undoes itself if you delete it halfway.

Built-in retention

Hourly, daily, weekly and monthly counts per policy, applied with restic forget --prune. A snapshot only appears once the run is complete.

Small and honest

One small controller. Tenant isolation on the share — each mover only ever sees its own folder. Alpha software, tested end to end.