DEV Community

Cover image for Bunker: backing up all my VPS from one place
Kushal Baral
Kushal Baral

Posted on

Bunker: backing up all my VPS from one place

I look after a few client projects spread across several VPS. Each server had its own cron job and its own pg_dump script, and there was no single place to see whether they all actually worked.

So I started writing bunker, a backup orchestrator in Go that does it from one place. It connects to each server over SSH, pulls the database dumps ,logs and folders, compresses and encrypts them on my machine, and saves a checksum for every file as a snapshots.

Nothing gets installed on the servers. A server only gives bunker a user with read access to its databases and folders. That's it.

The config is one YAML file:

servers:
  web-01:
    host: 203.0.113.10
    ssh: { user: bunker }
    backup:
      postgres: { dbs: [app_db] }
      paths: [/var/www/shop/media]
Enter fullscreen mode Exit fullscreen mode

Then:

bunker backup run --all
bunker backup verify web-01 2026-10-17T09-12-03
Enter fullscreen mode Exit fullscreen mode

I didn't want to reinvent existing backup tools.
It uses tools that already exist (pg_dump, tar, zstd, age) . These tools already do their jobs well.

The interesting part for me was building the orchestration around them(running several servers at once, not hanging when a server goes quiet, and making sure a broken backup never looks like a good one).

Right now it only handles Postgres and files, saved to local disk. I'm working on S3 and Docker next, and later an agent that runs on each server and backs it up on its own schedule, so no machine of mine has to stay.

It's open source if you want to look around or try it:
https://github.com/kushal1o1/bunker

Feedback, suggestions, and contributions are welcome.

And I'm curious:

How do you handle backups across your servers?

Do you use cron scripts, managed cloud backups, Restic, Borg, or something else?

I'd love to hear how others approach this. :)

Top comments (0)