diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index acedce9..45a7e87 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -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", diff --git a/plugin/.cursor-plugin/plugin.json b/plugin/.cursor-plugin/plugin.json index 87d52f9..d91a38c 100644 --- a/plugin/.cursor-plugin/plugin.json +++ b/plugin/.cursor-plugin/plugin.json @@ -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", diff --git a/plugin/.tessl-plugin/plugin.json b/plugin/.tessl-plugin/plugin.json index 9ea6948..81314be 100644 --- a/plugin/.tessl-plugin/plugin.json +++ b/plugin/.tessl-plugin/plugin.json @@ -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/" diff --git a/plugin/README.md b/plugin/README.md index b190eeb..fffdb59 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -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 @@ -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. diff --git a/plugin/plugin.json b/plugin/plugin.json index e20b8ea..3100c04 100644 --- a/plugin/plugin.json +++ b/plugin/plugin.json @@ -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", diff --git a/plugin/skills/supabase-backup/SKILL.md b/plugin/skills/supabase-backup/SKILL.md index 8b7bdc3..68a1b59 100644 --- a/plugin/skills/supabase-backup/SKILL.md +++ b/plugin/skills/supabase-backup/SKILL.md @@ -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 `, 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 `, 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). @@ -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. @@ -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. @@ -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 ` picks an older snapshot. `--verify-all-files` checksums every Storage file instead of a sample. - `--check-cmd ""` 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. @@ -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://.supabase.co --dry-run ) + npx -y backupdrill@2.11.2 restore --database --target-supabase-url https://.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`. diff --git a/plugin/skills/supabase-backup/assets/scheduled-backup.yml b/plugin/skills/supabase-backup/assets/scheduled-backup.yml index ce39387..e7dec2f 100644 --- a/plugin/skills/supabase-backup/assets/scheduled-backup.yml +++ b/plugin/skills/supabase-backup/assets/scheduled-backup.yml @@ -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 }}