A cron job or scheduled CI workflow starts Svalbard. Svalbard opens a snapshot of a PostgreSQL or MySQL database and writes a backup from it. The snapshot closes. Only then does Svalbard upload the backup to storage, where it settles beside earlier backups.
Svalbard is an open-source database backup CLI, written in Rust. It dumps the database from a snapshot, closes the snapshot, and only then uploads the backup.
PostgreSQL, MySQL to Amazon S3, Cloudflare R2, SFTP, SCP
Documentation
svalbard config check --config svalbard.toml
svalbard backup --config svalbard.toml --json- InstallThe release archive and the native clients
- ConfigurationFiles and environment variables, secrets from CI
- Run in CICI jobs, schedules and a GitHub Action
- DatabasesPostgreSQL and MySQL, snapshots and locks
- StorageAmazon S3, Cloudflare R2, SFTP and SCP
- RestoreBack into a database with the native clients
The name
Svalbard is an Arctic archipelago. Near Longyearbyen, theSvalbard Global Seed Vaultkeeps duplicate seed samples from gene banks around the world, so their collections can be rebuilt if the originals are lost. In 2015, the research centre ICARDA made the first withdrawal, to rebuild collections that the war in Syria had cut off. The project takes its name from the islands and the vault.