backupdrill 2.10.1 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -9
- package/dist/auth-archive.d.ts +31 -0
- package/dist/auth-archive.js +423 -0
- package/dist/auth-backup.d.ts +10 -1
- package/dist/auth-backup.js +134 -0
- package/dist/auth-drill.d.ts +41 -2
- package/dist/auth-drill.js +135 -22
- package/dist/backup.js +46 -3
- package/dist/drill.d.ts +45 -2
- package/dist/drill.js +262 -13
- package/dist/dump-sql.d.ts +6 -2
- package/dist/dump-sql.js +6 -2
- package/dist/recovery-doc.d.ts +7 -0
- package/dist/recovery-doc.js +13 -1
- package/dist/restore-engine.d.ts +21 -0
- package/dist/restore-engine.js +170 -0
- package/package.json +4 -2
- package/plugin/README.md +1 -1
- package/plugin/skills/supabase-backup/SKILL.md +5 -5
- package/plugin/skills/supabase-backup/assets/scheduled-backup.yml +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backupdrill",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Open-source CLI to back up a Supabase project
|
|
3
|
+
"version": "2.11.1",
|
|
4
|
+
"description": "Open-source CLI to back up a Supabase project to your own S3/R2/B2 bucket (the Postgres database, Auth users when your role can read them, and Storage files once you add the project's Storage S3 keys), then run a restore drill that proves the backup restores.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"backupdrill": "dist/index.js"
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"cloudflare-r2",
|
|
51
51
|
"backblaze-b2",
|
|
52
52
|
"disaster-recovery",
|
|
53
|
+
"supabase-auth",
|
|
54
|
+
"backup-verification",
|
|
53
55
|
"healthchecks",
|
|
54
56
|
"pi-package"
|
|
55
57
|
],
|
package/plugin/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Back up a Supabase project to a bucket you own and prove the backup restores, by
|
|
|
7
7
|
- `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.
|
|
8
8
|
- `restore` puts a snapshot into a new, empty Supabase project, after a dry run and only once you confirm the target.
|
|
9
9
|
|
|
10
|
-
The agent runs every command as `npx -y backupdrill@2.
|
|
10
|
+
The agent runs every command as `npx -y backupdrill@2.11.0`, so the CLI version stays fixed.
|
|
11
11
|
|
|
12
12
|
## What you need
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ description: Use when the user wants to back up a Supabase project to their own
|
|
|
7
7
|
|
|
8
8
|
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.
|
|
9
9
|
|
|
10
|
-
Always run it as `npx -y backupdrill@2.
|
|
10
|
+
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.
|
|
11
11
|
|
|
12
12
|
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).
|
|
13
13
|
|
|
@@ -71,7 +71,7 @@ Every backup reads the whole database, and every configured Storage file, out of
|
|
|
71
71
|
```sh
|
|
72
72
|
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
|
|
73
73
|
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
|
|
74
|
-
npx -y backupdrill@2.
|
|
74
|
+
npx -y backupdrill@2.11.0 estimate --plan pro )
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
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
|
|
|
82
82
|
report="$(mktemp "${TMPDIR:-/tmp}/backupdrill-backup.XXXXXX")" || exit 1; echo "stdout → $report"
|
|
83
83
|
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
|
|
84
84
|
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
|
|
85
|
-
npx -y backupdrill@2.
|
|
85
|
+
npx -y backupdrill@2.11.0 backup ) > "$report"
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
- 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,7 +95,7 @@ report="$(mktemp "${TMPDIR:-/tmp}/backupdrill-backup.XXXXXX")" || exit 1; echo "
|
|
|
95
95
|
```sh
|
|
96
96
|
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
|
|
97
97
|
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
|
|
98
|
-
npx -y backupdrill@2.
|
|
98
|
+
npx -y backupdrill@2.11.0 drill )
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
- 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.
|
|
@@ -114,7 +114,7 @@ A restore writes data, so go step by step and let the user drive.
|
|
|
114
114
|
```sh
|
|
115
115
|
( set +x; unset DATABASE_URL $(env | sed -n 's/^\(BACKUPDRILL_[A-Za-z0-9_]*\)=.*/\1/p')
|
|
116
116
|
set -a; . ./.env.backupdrill 2>/dev/null || { echo ".env.backupdrill could not be loaded" >&2; exit 1; }; set +a
|
|
117
|
-
npx -y backupdrill@2.
|
|
117
|
+
npx -y backupdrill@2.11.0 restore --database --target-supabase-url https://<target-ref>.supabase.co --dry-run )
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
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`.
|
|
@@ -99,7 +99,7 @@ jobs:
|
|
|
99
99
|
|
|
100
100
|
- name: Run backupdrill
|
|
101
101
|
# Pinned so every run uses the same CLI. Raise it on purpose when you upgrade.
|
|
102
|
-
run: npx -y backupdrill@2.
|
|
102
|
+
run: npx -y backupdrill@2.11.0 backup
|
|
103
103
|
env:
|
|
104
104
|
# --- required ---
|
|
105
105
|
BACKUPDRILL_DATABASE_URL: ${{ secrets.BACKUPDRILL_DATABASE_URL }}
|