Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backupdrill",
"displayName": "BackupDrill",
"version": "1.1.9",
"version": "1.1.10",
"description": "Back up a Supabase project to your own S3, R2 or B2 bucket with the open-source backupdrill CLI (the database, plus Storage files once you add their S3 keys), then run a restore drill to prove the snapshot restores.",
"author": {
"name": "BackupDrill",
Expand Down
2 changes: 1 addition & 1 deletion plugin/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backupdrill",
"displayName": "BackupDrill",
"version": "1.1.9",
"version": "1.1.10",
"description": "Back up a Supabase project to your own S3, R2 or B2 bucket with the open-source backupdrill CLI (the database, plus Storage files once you add their S3 keys), then run a restore drill to prove the snapshot restores.",
"author": {
"name": "BackupDrill",
Expand Down
2 changes: 1 addition & 1 deletion plugin/.tessl-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backupdrill/supabase-backup",
"version": "1.0.3",
"version": "1.0.4",
"description": "Back up a Supabase project to your own S3, R2 or B2 bucket with the open-source backupdrill CLI, run a restore drill to prove the snapshot restores, and restore into a new project. Includes plain pg_dump and pg_restore notes for Supabase and what the Free plan does and doesn't back up.",
"private": false,
"skills": "./skills/"
Expand Down
4 changes: 2 additions & 2 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Back up a Supabase project to a bucket you own and prove the backup restores, by
- `drill` restores a snapshot into a throwaway Postgres in Docker, checks that the tables and their data came back, and checksums a sample of the Storage files.
- `restore` puts a snapshot into a new, empty Supabase project, after a dry run and only once you confirm the target.

The agent runs every command as `npx -y backupdrill@2.11.0`, so the CLI version stays fixed.
The agent runs every command as `npx -y backupdrill@2.11.2`, so the CLI version stays fixed.

## What you need

Expand Down Expand Up @@ -56,7 +56,7 @@ Everything runs on your machine:

- `npx` downloads the `backupdrill` package from the npm registry the first time.
- The CLI connects to your Supabase project's database, to its Storage if you add Storage S3 keys, and to your bucket. `restore` also connects to the target project you name.
- `drill` starts a temporary Postgres container in Docker. The first time, Docker downloads the Postgres image from Docker Hub.
- `drill` starts a temporary Postgres container in Docker. Before each drill, Docker checks Docker Hub and downloads any missing image layers. If that fails and a local image is available, `drill` uses it.
- Nothing goes to BackupDrill. There is no account, telemetry or license check.

What the agent reads while it works, such as command output with table names, row counts and file names, goes to your model provider like the rest of your conversation. The CLI itself never deletes objects in your bucket.
Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "backupdrill",
"version": "1.1.9",
"version": "1.1.10",
"description": "Back up a Supabase project to your own S3, R2 or B2 bucket with the open-source backupdrill CLI (the database, plus Storage files once you add their S3 keys), then run a restore drill to prove the snapshot restores.",
"author": {
"name": "BackupDrill",
Expand Down
12 changes: 6 additions & 6 deletions plugin/skills/supabase-backup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Use when the user wants to back up a Supabase project to their own

backupdrill is an open-source (MIT) command-line tool. `backup` dumps the project's Postgres database with `pg_dump`, copies Storage files too once their S3 keys are set, and writes everything to a bucket the user owns, with a checksummed `manifest.json` and a `RECOVERY.md` in every snapshot. `drill` restores a snapshot into a throwaway Postgres in Docker and checks that it came back. The CLI runs on the user's machine. It talks to their Supabase project, their bucket and the local Docker daemon, and sends nothing to BackupDrill.

Always run it as `npx -y backupdrill@2.11.0 <command>`, so every run uses the same version. Every command and option is documented at [backupdrill.com/docs/cli](https://backupdrill.com/docs/cli); check there before using an option this skill doesn't mention.
Always run it as `npx -y backupdrill@2.11.2 <command>`, so every run uses the same version. Every command and option is documented at [backupdrill.com/docs/cli](https://backupdrill.com/docs/cli); check there before using an option this skill doesn't mention.

If the user asks what Supabase already backs up on their plan, wants a plain `pg_dump` backup without the CLI, or wants to test a restore by hand, read [references/postgres-backup-basics.md](references/postgres-backup-basics.md).

Expand Down Expand Up @@ -71,7 +71,7 @@ Every backup reads the whole database, and every configured Storage file, out of
```sh
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
npx -y backupdrill@2.11.0 estimate --plan pro )
npx -y backupdrill@2.11.2 estimate --plan pro )
```

Use `--plan free`, `pro` or `team` to match their Supabase plan, and read the projection back before suggesting a daily schedule. On a large database, suggest weekly.
Expand All @@ -82,7 +82,7 @@ Use `--plan free`, `pro` or `team` to match their Supabase plan, and read the pr
report="$(mktemp "${TMPDIR:-/tmp}/backupdrill-backup.XXXXXX")" || exit 1; echo "stdout → $report"
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
npx -y backupdrill@2.11.0 backup ) > "$report"
npx -y backupdrill@2.11.2 backup ) > "$report"
```

- The progress lines on stderr show where everything went (`Dumping → s3://…`, `Manifest written → s3://…`) and end with `Backup complete — N tables + M Storage files`. stdout goes to the file named on the first line, a new one each run that only the user can read: one line of JSON with the whole manifest, which lists every table and Storage file, so read only the fields you need from it.
Expand All @@ -95,10 +95,10 @@ report="$(mktemp "${TMPDIR:-/tmp}/backupdrill-backup.XXXXXX")" || exit 1; echo "
```sh
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
npx -y backupdrill@2.11.0 drill )
npx -y backupdrill@2.11.2 drill )
```

- It reads the latest snapshot from the bucket, restores it into a throwaway Postgres container, runs its checks and removes the container. It doesn't connect to the Supabase project. The first run pulls a Postgres image from Docker Hub.
- It reads the latest snapshot from the bucket, restores it into a throwaway Postgres container, runs its checks and removes the container. It doesn't connect to the Supabase project. Before starting Postgres, `drill` checks Docker Hub and downloads any missing image layers. If the pull fails and a local image is available, `drill` uses it.
- `--snapshot <timestamp>` picks an older snapshot. `--verify-all-files` checksums every Storage file instead of a sample.
- `--check-cmd "<command>"` runs the user's own test against the restored copy, with its connection string in `BACKUPDRILL_SANDBOX_URL`. It connects as a superuser, so it can check data and business rules but not row-level security.
- stdout ends with `{"ok":...,"report":{...}}`. Go through the check lines. If the drill fails, quote the failing check as printed and don't guess at a cause it doesn't state.
Expand All @@ -114,7 +114,7 @@ A restore writes data, so go step by step and let the user drive.
```sh
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
npx -y backupdrill@2.11.0 restore --database --target-supabase-url https://<target-ref>.supabase.co --dry-run )
npx -y backupdrill@2.11.2 restore --database --target-supabase-url https://<target-ref>.supabase.co --dry-run )
```

Leave out `--target-supabase-url` when the snapshot is database only. To write Storage files to a local folder instead of the new project, use `--storage-dir ./recovered`.
Expand Down
2 changes: 1 addition & 1 deletion plugin/skills/supabase-backup/assets/scheduled-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Run backupdrill
# Pinned so every run uses the same CLI. Raise it on purpose when you upgrade.
run: npx -y backupdrill@2.11.0 backup
run: npx -y backupdrill@2.11.2 backup
env:
# --- required ---
BACKUPDRILL_DATABASE_URL: ${{ secrets.BACKUPDRILL_DATABASE_URL }}
Expand Down