Analysis updated 2026-05-18
Automatically back up a PostgreSQL database every night to S3-compatible cloud storage.
Keep daily, weekly, and monthly backup tiers with automatic cleanup of old files.
Get alerted immediately if a scheduled backup fails or silently stops running.
Restore a database backup and verify it works using a throwaway test container.
| brayzonn/vps-pg-backup | aasheeshlikepanner/vase | alexzielenski/controller-runtime | |
|---|---|---|---|
| Stars | 0 | 0 | — |
| Language | Go | Go | Go |
| Last pushed | — | — | 2022-04-20 |
| Maintenance | — | — | Dormant |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 4/5 | 4/5 |
| Audience | ops devops | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Go to build, an S3-compatible bucket, and a cron job on a VPS.
This project is a tool that automatically backs up a PostgreSQL database every night and keeps those backups safe in the cloud. It runs on a schedule, dumps the database, compresses the file, and uploads it to a cloud storage service that works like Amazon S3, such as Cloudflare R2 or Backblaze B2. It then organizes older backups into daily, weekly, and monthly folders, deleting ones that are past their expiration window so storage does not grow forever. The retention setup follows a common backup pattern: daily backups are kept for two weeks, weekly backups made every Sunday are kept for about two months, and monthly backups made on the first of the month are kept for roughly six months. All of these time windows can be adjusted through settings. A key part of the tool is that it watches itself for failures in two separate ways. First, if something goes wrong during the backup process itself, such as the upload failing or the dump coming out empty, it sends a failure alert to a notification service, which can then forward that alert to Discord, Slack, or similar tools. Second, it also pings an outside monitoring service called healthchecks.io every time a backup succeeds. If that outside service does not hear from the backup tool within about a day, it raises its own alarm, which catches problems the first alert system might miss, like the whole server being down or the scheduled job never running at all. The tool is written in Go and compiles into a single standalone program, so it can be copied onto a server and run without installing extra software. All of its settings, including database details, cloud storage credentials, and alert webhook addresses, are provided through environment variables rather than being written into the code. The README also explains how to restore a backup using the AWS command line tool and how to test that a backup actually works by restoring it into a temporary, throwaway database container.
An automated tool that backs up a PostgreSQL database nightly to cloud storage and alerts you if a backup ever fails.
Mainly Go. The stack also includes Go, PostgreSQL, AWS CLI.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.