Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -4,8 +4,8 @@
|
||||
operators clone a single tenant's Postgres rows + S3 storage objects into a
|
||||
PII-anonymized archive, then replay that archive into another environment.
|
||||
|
||||
This runbook is the operator-facing companion to the implementation spec at
|
||||
`docs/improvement-plan/03-scaling-infrastructure/tenant-snapshot.md`.
|
||||
This runbook is the operator-facing companion to the tenant snapshot
|
||||
implementation in `packages/cli`.
|
||||
|
||||
---
|
||||
|
||||
@@ -36,7 +36,7 @@ privacy risk. The full mapping table lives in
|
||||
| Phone number | `null` | `null` | (untouched) |
|
||||
| IP address | `127.0.0.<seeded>` | `127.0.0.<seeded>` | (untouched) |
|
||||
| ZIP code | first two digits kept, rest reseeded | first two digits kept, rest reseeded | (untouched) |
|
||||
| Stripe customer / subscription / payment-method id | `cus_anon<8 hex>` / `sub_anon<8 hex>` / `pm_anon<8 hex>` | same as full | (untouched) |
|
||||
| Legacy-Provider customer / subscription / payment-method id | `cus_anon<8 hex>` / `sub_anon<8 hex>` / `pm_anon<8 hex>` | same as full | (untouched) |
|
||||
| Webhook / SSO / domain URL | `https://anonymized.test/<8 hex>` | same as full | (untouched) |
|
||||
| Secrets, API keys, refresh tokens, payloads | `[REDACTED]` | `[REDACTED]` | (untouched) |
|
||||
| Avatar URL | `https://anonymized.test/avatar/<8 hex>.png` | same as full | (untouched) |
|
||||
@@ -54,9 +54,9 @@ anywhere; only its `sha256` lives in the manifest as a reproducibility marker.
|
||||
### Create a snapshot (default profile, age-encrypted, upload to S3)
|
||||
|
||||
```bash
|
||||
toolctrl-cli tenant snapshot \
|
||||
hivegrid-cli tenant snapshot \
|
||||
--tenant-id ten_abc123 \
|
||||
--output s3://toolctrl-snapshots/ten_abc123/$(date -u +%Y%m%dT%H%M%SZ).tar.gz.age
|
||||
--output s3://hivegrid-snapshots/ten_abc123/$(date -u +%Y%m%dT%H%M%SZ).tar.gz.age
|
||||
```
|
||||
|
||||
The CLI requires `BACKUP_AGE_PUBLIC_KEY` (recipient public key) plus
|
||||
@@ -66,9 +66,9 @@ catalog — the snapshot command reuses the same encryption layer.
|
||||
### Restore into a dev box
|
||||
|
||||
```bash
|
||||
NODE_ENV=development toolctrl-cli tenant restore \
|
||||
NODE_ENV=development hivegrid-cli tenant restore \
|
||||
--tenant-id ten_devclone \
|
||||
--source s3://toolctrl-snapshots/ten_abc123/2026-05-17T03:00:00Z.tar.gz.age
|
||||
--source s3://hivegrid-snapshots/ten_abc123/2026-05-17T03:00:00Z.tar.gz.age
|
||||
```
|
||||
|
||||
The command refuses to run under `NODE_ENV=production` unless the operator
|
||||
@@ -78,7 +78,7 @@ with `--yes` for non-interactive pipelines.
|
||||
### List existing snapshots
|
||||
|
||||
```bash
|
||||
toolctrl-cli tenant list-snapshots --bucket toolctrl-snapshots
|
||||
hivegrid-cli tenant list-snapshots --bucket hivegrid-snapshots
|
||||
```
|
||||
|
||||
### Super-admin escape hatch (`--profile=none`)
|
||||
@@ -86,11 +86,11 @@ toolctrl-cli tenant list-snapshots --bucket toolctrl-snapshots
|
||||
Raw, un-anonymized exports require an explicit confirmation flag:
|
||||
|
||||
```bash
|
||||
toolctrl-cli tenant snapshot \
|
||||
hivegrid-cli tenant snapshot \
|
||||
--tenant-id ten_abc123 \
|
||||
--profile none \
|
||||
--i-am-the-super-admin \
|
||||
--output s3://toolctrl-snapshots/migration/ten_abc123.tar.gz.age
|
||||
--output s3://hivegrid-snapshots/migration/ten_abc123.tar.gz.age
|
||||
```
|
||||
|
||||
Without `--i-am-the-super-admin`, the command exits non-zero with a clear
|
||||
@@ -123,14 +123,14 @@ redirect that into their central audit log; set `auditFilePath` when calling
|
||||
|
||||
1. Snapshot a representative tenant from staging:
|
||||
```bash
|
||||
toolctrl-cli tenant snapshot --tenant-id <staging-tenant> \
|
||||
hivegrid-cli tenant snapshot --tenant-id <staging-tenant> \
|
||||
--profile full-anonymized \
|
||||
--output /snapshots/drill-$(date -u +%Y%m%d).tar.gz.age
|
||||
```
|
||||
2. Copy to a dev box and restore into a fresh database:
|
||||
```bash
|
||||
NODE_ENV=development DATABASE_URL=postgres://... \
|
||||
toolctrl-cli tenant restore \
|
||||
hivegrid-cli tenant restore \
|
||||
--tenant-id ten_drill_$(date +%s) \
|
||||
--source /snapshots/drill-$(date -u +%Y%m%d).tar.gz.age \
|
||||
--yes
|
||||
@@ -182,10 +182,10 @@ The restore command accepts one of three strategies (default
|
||||
|
||||
```bash
|
||||
# Default — overlay snapshot rows onto whatever already exists.
|
||||
toolctrl-cli tenant restore --tenant-id ten_new --source ./snap.tar.gz
|
||||
hivegrid-cli tenant restore --tenant-id ten_new --source ./snap.tar.gz
|
||||
|
||||
# Sensitive restore: refuse to proceed if any global is already there.
|
||||
toolctrl-cli tenant restore --tenant-id ten_new --source ./snap.tar.gz \
|
||||
hivegrid-cli tenant restore --tenant-id ten_new --source ./snap.tar.gz \
|
||||
--globals=error
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user