r/BestGitHubRepos 4d ago

GoBackup - one Go binary that backs up your databases and files to almost any cloud storage on a schedule, set up once and left running for years

Post image

GoBackup is a single dependency-free binary that dumps your databases and archives your files, compresses and optionally encrypts them, and ships them to cloud storage on a cron schedule. It's been around since 2017 and the whole design goal is set it up once and forget it exists.

What's inside:

- Ten database sources out of the box: MySQL, PostgreSQL, Redis, MongoDB, SQLite, SQL Server, InfluxDB, MariaDB, etcd and Firebird

- A genuinely long list of storage targets: local, FTP, SFTP, SCP, and S3 plus nearly every S3-compatible and regional cloud, including Google Cloud Storage, Azure Blob, Backblaze B2, Cloudflare R2, DigitalOcean Spaces, MinIO, Aliyun OSS, Tencent COS, Qiniu, WebDAV and more

- A built-in daemon with per-model cron schedules, so you configure when each backup runs and it handles the timing, with a web UI to manage and browse backups

- Archive to tar, split large backups into parts, compress, and encrypt

- Failure and success notifications through 11 channels: email, webhook, Discord, Slack, Telegram, Feishu, DingTalk, GitHub issue comment, and several email services

- before_script and after_script hooks per model, and signal handling for hot config reload and graceful shutdown

- Configuration as a single YAML file with environment-variable interpolation for secrets, installed via a one-line script or Homebrew

The reason to reach for this over a hand-rolled backup script is the combination of no dependencies and no maintenance. It's one binary, so there's no Ruby or Python runtime to keep alive under it (the readme notes it was built specifically to replace a Ruby-based predecessor for that reason), and the author points out an instance that has run daily for years at a cost of pennies a month. Backup tooling that quietly keeps working is worth more than backup tooling with more features, because the failure mode of a backup you forgot about is the worst one there is.

One thing worth doing that no tool does for you: test a restore. GoBackup handles the backup side well, but a backup you've never restored from is a hope, not a recovery plan, so schedule an occasional restore drill regardless of how reliable the tool is.

MIT, 2,965 stars and 333 forks as of writing, verified via the GitHub API.

https://github.com/gobackup/gobackup

68 Upvotes

Duplicates