Self-hosted backup service for files and databases. Each job reads from one or more sources, packs the data into an archive (optionally encrypted), and uploads it to one or more storages — all on a cron schedule. The web UI and REST API let you see job status, follow live logs, trigger runs, and download archives.
- One job can read from many sources and upload to many storages.
- Database dumps for Postgres, MySQL, MariaDB, MongoDB, Redis, and SQLite. Plus plain local files.
- Compression:
tar,tar.gz,gzip,zip. You can split large archives into parts. - Optional encryption with OpenSSL (AES-256-CBC and similar ciphers).
- Retention per storage — keep the last N runs.
- Notifications via webhook, Telegram, or email — on success, failure, or both.
- Web UI and REST API. OpenAPI spec at
/api/v1/openapi. - Run a shell script before or after a job (
beforeScript/afterScript). - One Go binary, no runtime. You only need the dump tools for the databases you back up (
pg_dump,mysqldump,mongodump,redis-cli).
docker run -d \
--name snapr \
-p 8080:8080 \
-e SNAPR_ADMIN_PASSWORD=changeme \
-v $(pwd)/snapr.yaml:/etc/snapr/snapr.yaml:ro \
-v $(pwd)/backups:/var/backups \
ghcr.io/maximseshuk/snapr:latestOpen http://localhost:8080 and sign in as admin with the password you set.
Download a pre-built archive from Releases (Linux and macOS, amd64 and arm64), or install with Go:
go install github.com/maximseshuk/snapr/cmd/snapr@latest
snapr -config ./snapr.yamlserver:
address: '0.0.0.0:8080'
auth:
enabled: true
username: admin
password: env:SNAPR_ADMIN_PASSWORD
jobs:
- name: nightly-files
schedule: '0 2 * * *'
compression: tar.gz
sources:
- type: local
path: /var/data
storages:
- name: local-disk
type: local
path: /var/backups
retention:
last: 7This config backs up /var/data to /var/backups every night at 02:00 and keeps the last 7 archives. For everything else see the Quick Start and the full configuration reference.
You need Go 1.25+, Node 22+, and pnpm 10+.
git clone https://github.com/maximseshuk/snapr.git
cd snapr
pnpm install
pnpm run stack:up # starts MinIO, Postgres, SFTP, and WebDAV in Docker
pnpm run dev # snapr API on :47100, web UI on :5173The dev stack uses the sample config examples/dev/snapr.yaml, which has a job for every storage backend.
Note
pnpm run dev runs the Go API and the Vite dev server together. The Docker stack only starts the storage targets — snapr itself runs from source on your machine.
Useful scripts:
| Command | What it does |
|---|---|
pnpm run build |
Build the web UI and the Go binary into ./bin/snapr |
pnpm run stack:up / stack:down / stack:reset |
Manage the Docker dev stack |
pnpm run test / test:race / test:cover |
Run the Go test suite |
pnpm run lint / lint:fix |
Lint Go and web code |
pnpm run format / format:check |
Format Go and web code |
pnpm run docs:dev / docs:build |
Run or build the docs site |
Full docs are at https://snapr.seshuk.im/:
Source files for the docs live in docs/docs/.
Bug reports, feature requests, and questions go to GitHub Issues.
MIT — see LICENSE.
Built by Maxim Seshuk.
If snapr saves you time, you can buy me a coffee ☕