Overview
Svalbard is an open-source command-line tool for database backups, written in Rust. It backs up one PostgreSQL or MySQL database per run to Amazon S3, Cloudflare R2, another S3-compatible service, or an SSH server with SFTP or SCP. CI or cron owns the schedule. Svalbard has no server and no hosted control plane.
| Sources | Destinations |
|---|---|
| PostgreSQL 15, 16, 17 and 18 | Amazon S3 and S3-compatible services |
| MySQL 8.4 and 9.7, InnoDB | Cloudflare R2 |
| SSH servers, with SFTP or SCP |
How a backup runs
Section titled “How a backup runs”- Svalbard checks the configuration and the destination, without writing.
- It dumps the database from a snapshot with the native client,
pg_dumpormysqldump, into a private staging directory. A watchdog ends the backup sessions when they block other sessions. - It closes the snapshot and the database connections, and only then uploads the dump and its completion record.
- It deletes the staging directory. A backup is complete only when the dump and its record are both stored.
- Install: the release archive, the native clients, or a build from source.
- Configuration: the settings, their flags and environment variables, TLS and secrets.
- Storage: the stored objects, and the S3, R2 and SSH destinations.
- Back up: the stages, cancellation, the output and the exit codes.
- Restore: the native restore of a backup.
- Run in CI and the GitHub Action.
- Database safety contract: the rules that protect the source database.
- Development: checks, tests, releases and this website.
Svalbard is MIT licensed. The license covers the code, not the name or the logos: see trademarks. The source is on GitHub.