DEV Community

SuperLede
SuperLede

Posted on

Pinned or floating: the versions behind a Supabase backup job

A scheduled Supabase backup can run different versions even when the workflow file stays the same. The CI wrapper's tag can move, the backup CLI can pick up a new minor or patch release, and the runner can get newer copies of pg_dump and pg_restore. If a restore drill starts failing, check which versions the job ran.

The examples here use one MIT-licensed CLI, backupdrill, packaged three ways: the Supabase backup GitHub Action, the Supabase backup Buildkite plugin and the supabase-backup agent skill on Tessl. All three write snapshots to an S3-compatible bucket, with dump.pgcustom and manifest.json in each snapshot folder. They differ in which versions they run by default. I read their source and READMEs on November 30, 2026, ran the npm lookups below and tested the plugin's version check.

What moves where

GitHub Action @v1 Buildkite plugin #v1.0.0 Tessl skill 1.0.2
CLI "2": npx --yes backupdrill@2, once for the backup and again for the drill "2": newest 2.x, installed once per job 2.10.1, written into every command
pg_dump / pg_restore 17 by default, from /usr/lib/postgresql/17/bin, or installed from the PostgreSQL apt repo the agent's PATH by default, or the paths you set 17, which you install (libpq@17 on macOS)
Node.js 24, set up by the action the agent's own, 20 or newer 20 or newer, on your machine

Here is what "2" meant today:

$ npm view backupdrill@2 version | tail -1
backupdrill@2.11.2 '2.11.2'
$ npm view backupdrill@2.10 version | tail -1
backupdrill@2.10.1 '2.10.1'
Enter fullscreen mode Exit fullscreen mode

On November 30, npm listed 2.11.2, released November 25, as the newest match for backupdrill@2. A fresh install by the Buildkite plugin would have picked 2.11.2. The Action goes through npx, which can reuse a matching 2.x it already finds locally. Tessl skill 1.0.2 calls backupdrill@2.10.1.

The CLI version

The Action and the plugin both take a backupdrill-version setting and accept only three shapes: 2, 2.10 or 2.10.1. Anything else stops the step before npm runs. I ran the plugin's hook with three common guesses:

$ BUILDKITE_PLUGIN_SUPABASE_BACKUP_BACKUPDRILL_VERSION=latest hooks/command
supabase-backup: backupdrill-version must look like 2, 2.8 or 2.8.1
Enter fullscreen mode Exit fullscreen mode

^2 and 2.10.1-beta got the same message. The two-part form is a middle setting: 2.10 takes patch releases within 2.10 and nothing newer.

To pin the CLI in GitHub Actions:

- 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"
    backupdrill-version: "2.11.2"
Enter fullscreen mode Exit fullscreen mode

To pin the CLI in Buildkite:

plugins:
  - backupdrill/supabase-backup#v1.0.0:
      s3-bucket: my-db-backups
      drill: true
      backupdrill-version: "2.11.2"
Enter fullscreen mode Exit fullscreen mode

The Action's README presents the floating default as a choice: CLI fixes reach you without editing the workflow. The CLI follows semantic versioning, and a 3.x default would ship as a new major version of the Action. With a drill on every run, floating is a reasonable default. Pin when you'd rather a failed drill have one less possible cause.

New snapshots record a schemaVersion in manifest.json, and the CLI refuses a schema version higher than it supports instead of guessing. Here's the error from the source, for a schema 3 that doesn't exist yet:

This snapshot's manifest uses schema version 3, but this BackupDrill understands up to 2. Upgrade the CLI (npm i -g backupdrill@latest) to read it.
Enter fullscreen mode Exit fullscreen mode

Versions 2.9.0 and 2.10.0 added fields without raising the schema, and 2.11.2 still writes 2. So the skill's 2.10.1 gets past that check on snapshots the Action writes with 2.11.2. If a later release writes a higher schema, upgrade every older CLI that needs to read those snapshots, including the one pinned in the skill.

The Postgres client version

The CLI reads the server version first and refuses an older pg_dump. The error, as written in its source, for a version 15 client against a 17 server:

pg_dump is v15 but the server is v17. pg_dump must be >= the server major version. Install postgresql-client-17 (or newer) and/or point BACKUPDRILL_PG_DUMP at it.
Enter fullscreen mode Exit fullscreen mode

A newer pg_dump can still dump the source. The drill then uses whichever major is higher: the source server's or the local pg_restore's. The sandbox image is postgres:<major>-alpine, or pgvector/pgvector:pg<major> when the database uses the vector extension.

On a Postgres 17 project, that works out like this:

  • postgres-version: "17" (the default): the drill restores into Postgres 17, the same major as production.
  • postgres-version: "18": pg_dump 18 can still dump the 17 source, but the drill now uses a Postgres 18 sandbox and reports sandbox version — restored into PostgreSQL 18 (source is 17) among its checks. If that drill passes, you've verified the dump loads into 18. The pg_dump documentation says plainly that "it is not guaranteed that pg_dump's output can be loaded into a server of an older major version".

Projects on Postgres 15 need extra care. The Action's README says the default 17 covers projects on 15 and 17, and for backups it does. The drill, though, runs in a Postgres 17 sandbox, and its sandbox line gives the reason: pg_restore 17 sends SET transaction_timeout, which Postgres 15 rejects. A real backupdrill restore into a Postgres 15 target with 17 tools stops before it downloads the dump and tells you to create the target on PostgreSQL 17 or newer.

The Action and the skill name a client major. The Buildkite plugin uses what it finds:

  • Action: it looks for both tools in /usr/lib/postgresql/<major>/bin, where <major> is your postgres-version. If either is missing there, it installs postgresql-client-<major> from the PostgreSQL apt repository. The minor version is whatever the runner image or the repository has.
  • Buildkite plugin: by default it uses whatever client tools come first on the agent's PATH. If a rebuilt agent image puts pg_restore 18 first, drills of a Postgres 17 source switch to a Postgres 18 sandbox without any change to your pipeline. Set the binaries explicitly on the step. These are the paths postgresql-client-17 uses on Debian and Ubuntu, and if you only set BACKUPDRILL_PG_DUMP, the CLI looks for pg_restore in the same directory:
- label: ":floppy_disk: Back up Supabase"
  env:
    BACKUPDRILL_PG_DUMP: /usr/lib/postgresql/17/bin/pg_dump
    BACKUPDRILL_PG_RESTORE: /usr/lib/postgresql/17/bin/pg_restore
Enter fullscreen mode Exit fullscreen mode
  • Skill: it tells the agent to use version 17 and points out that plain libpq on Homebrew is now 18, "whose dumps can contain SQL that Postgres 17 rejects". The path goes into BACKUPDRILL_PG_DUMP, so the major stays at 17 until you change it. A Homebrew upgrade of libpq@17 can still bring a newer 17.x minor.

The wrapper itself

backupdrill/supabase-backup-action@v1 follows the v1 tag, which can move. Right now v1 and v1.0.0 point at the same commit (62ec4a2). The only newer commit on main changes the README. @v1.0.0 selects that release, but a tag can be moved, so use the full commit SHA if you want the wrapper fixed to one commit. The Buildkite plugin has no v1 tag. Its #v1.0.0 release tag could be moved too.

The Action also brings its own Node 24 through actions/setup-node, and later steps in the same job see Node 24 too. If a later step in that job expects a different Node, set it up again after the backup step.

Checking an upgrade

After changing any of these settings, run the job once by hand with the drill on. Then read the new manifest for the CLI that wrote the snapshot (toolVersion), the source Postgres version (database.serverVersion) and the full pg_dump --version line (database.pgDumpVersion):

aws s3 cp "s3://my-db-backups/backupdrill/my-app/<snapshot>/manifest.json" - \
  | jq '{schemaVersion, toolVersion,
         serverVersion: .database.serverVersion,
         pgDumpVersion: .database.pgDumpVersion}'
Enter fullscreen mode Exit fullscreen mode

Add --endpoint-url for R2 or B2. In GitHub Actions, the dump-key output gives you the path: swap dump.pgcustom for manifest.json. On Buildkite, if the CLI version is all you need, the annotation names it, as in "to snapshot … with backupdrill 2.8.1." For the pg_dump version you still need the manifest.

Then read the drill's checks. A sandbox version line tells you the drill used a newer Postgres major than your project runs. To test recovery on your project's own major, take a fresh backup with matching client tools and run the drill again.

Change one layer at a time, and keep a note of which wrapper version and which pg_restore --version each run used, since neither is in the manifest. If a drill fails after an upgrade, compare those, the manifest and the drill log with the last passing run.

Top comments (0)