A green backup job tells you the dump reached the bucket, not that it restores. A restore drill loads that dump into a throwaway Postgres and checks what came back. On a two-table test database in GitHub Actions, the drill step took 6.8 seconds, Postgres image pull included.
I maintain three CI wrappers around the same open-source backup CLI: a GitHub Action for scheduled Supabase backups, a Buildkite plugin that backs up before your migrations run, and a Woodpecker CI plugin that picks pg_dump by server version. The timings below come from the GitHub Action's test workflow and the Buildkite plugin's end-to-end test.
What all three write
Each run streams a pg_dump custom-format file straight into an S3, R2 or B2 bucket you own, without staging it on the CI machine. Next to it go a RECOVERY.md with the restore commands and a manifest.json with the tables in the schemas you chose (public by default), estimated row counts and SHA-256 checksums. The manifest is written last, so a snapshot without one is incomplete.
In GitHub Actions and Buildkite, the drill then downloads the dump, checks its SHA-256 and restores it with pg_restore into a temporary Postgres container. It checks that every table in manifest.json came back. If a table the manifest expected to have rows comes back empty, it checks the dump to confirm the table was empty to begin with. Any failed check fails the CI job.
GitHub Actions: on a schedule
on: schedule: - cron: "0 3 * * 0" # Sundays at 03:00 UTC workflow_dispatch: {} concurrency: group: supabase-backup cancel-in-progress: false jobs: backup: runs-on: ubuntu-latest steps: - uses: backupdrill/supabase-backup-action@v1 with: database-url: ${{ secrets.BACKUPDRILL_DATABASE_URL }} s3-bucket: ${{ secrets.BACKUPDRILL_S3_BUCKET }} s3-access-key-id: ${{ secrets.BACKUPDRILL_S3_ACCESS_KEY_ID }} s3-secret-access-key: ${{ secrets.BACKUPDRILL_S3_SECRET_ACCESS_KEY }} drill: "true" For AWS S3, set s3-region to the bucket's region. For R2, set s3-endpoint. For B2, set s3-endpoint and use the region from that endpoint as s3-region. The same applies to the Buildkite example below. The concurrency block keeps two runs from reading Supabase at the same time. Use a private repository: the log lists the project name, snapshot times and table counts.
In the action's own test run on a GitHub-hosted ubuntu-26.04 runner, against a two-table test database:
| Step | Time |
|---|---|
Install postgresql-client-17 | 8.6 s |
| Backup | 3.5 s |
Restore drill, including pulling postgres:17-alpine | 6.8 s |
pg_restore itself (4 parallel jobs) | 0.2 s |
The client install is there because the pg_dump on the runner image can be older than your database, and pg_dump refuses to dump a newer server. In the drill's log, 5.4 of the 6.8 seconds passed between "Pulling postgres:17-alpine" and "Restoring into ephemeral Postgres".
Buildkite: before a deploy
On Buildkite the natural place is in front of the migration step, with a wait between them, so a failed backup stops the deploy:
steps: - label: ":floppy_disk: Back up Supabase" secrets: - BACKUPDRILL_DATABASE_URL - BACKUPDRILL_S3_ACCESS_KEY_ID - BACKUPDRILL_S3_SECRET_ACCESS_KEY plugins: - backupdrill/supabase-backup#v1.0.0: s3-bucket: my-db-backups project-name: my-app drill: true - wait - label: ":rocket: Migrate" command: ./migrate.sh Credentials go in as Buildkite job secrets rather than plugin options, so their values stay out of the pipeline YAML. The plugin reads BACKUPDRILL_DATABASE_URL and ignores a plain DATABASE_URL on purpose, since in CI that usually points at the app's test database.
In the plugin's end-to-end test, which runs on GitHub Actions with a stand-in buildkite-agent, the step produced this annotation text. Its 0.4 seconds cover the restore phase only:
Backed up 2 tables (12.8 KiB dump) to snapshot 2026-10-31T09-49-52-802Z with backupdrill 2.9.0. Restore drill passed: 2 tables and 1,300 rows restored in 0.4s.
The Buildkite agent needs Node.js 20 or newer, npm, and a pg_dump at least as new as the database server. The drill also needs Docker and a pg_restore from the same major version as pg_dump, and it connects to the temporary Postgres on 127.0.0.1. If the job runs in a container on the agent's Docker host, use host networking and mount the Docker socket.
Woodpecker: PostgreSQL clients in the image
Woodpecker plugins are container images. This one comes with Node.js, the CLI and the PostgreSQL 16, 17 and 18 clients, with the CLI and its dependencies installed from a lockfile. Once the image is on the runner, the backup step installs nothing.
Before dumping, it asks the server for its major version and uses the matching pg_dump for PostgreSQL 16 to 18. Servers on 15 or older get pg_dump 16. If the version can't be read, the step fails before anything is dumped. It picks the matching version rather than the newest because a dump needs a pg_restore at least as new as the pg_dump that wrote it, and each snapshot's RECOVERY.md names that version.
This plugin backs up only. It doesn't run a drill.
Before you schedule it daily
Each backup dumps the chosen schemas in full, and Supabase counts that traffic as uncached egress. Pro includes 250 GB per billing cycle and charges $0.09 per GB above it when the Spend Cap is off. If each backup sends 50 GB and nothing else in your organization uses uncached egress, four or five weekly runs fit in the allowance, while 30 daily runs come to about $112 in overage. Start weekly, and add one right before migrations.
The checks the drill runs, and what to do when one fails, are in this guide on how to test that a Supabase backup actually restores.
I work on BackupDrill. The three plugins and the CLI they run are MIT-licensed.
I used AI to help draft this post.

