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
@@ -1,7 +1,7 @@
|
||||
# Backup CLI Runbook
|
||||
|
||||
Operator guide for `@toolctrl/cli backup:*`. The CLI ships in `packages/cli` and
|
||||
is callable as `toolctrl-cli backup <subcommand>` once the workspace is
|
||||
Operator guide for `@hivegrid/cli backup:*`. The CLI ships in `packages/cli` and
|
||||
is callable as `hivegrid-cli backup <subcommand>` once the workspace is
|
||||
installed.
|
||||
|
||||
## Quick reference
|
||||
@@ -21,16 +21,16 @@ bucket so a compromised app credential cannot pivot to the backups.
|
||||
|
||||
```bash
|
||||
# MinIO example (staging)
|
||||
mc mb staging-minio/toolctrl-backups
|
||||
mc anonymous set none staging-minio/toolctrl-backups
|
||||
mc mb staging-minio/hivegrid-backups
|
||||
mc anonymous set none staging-minio/hivegrid-backups
|
||||
|
||||
# AWS S3 example
|
||||
aws s3api create-bucket --bucket toolctrl-backups \
|
||||
aws s3api create-bucket --bucket hivegrid-backups \
|
||||
--create-bucket-configuration LocationConstraint=us-east-1
|
||||
aws s3api put-bucket-encryption --bucket toolctrl-backups \
|
||||
aws s3api put-bucket-encryption --bucket hivegrid-backups \
|
||||
--server-side-encryption-configuration \
|
||||
'{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}'
|
||||
aws s3api put-public-access-block --bucket toolctrl-backups \
|
||||
aws s3api put-public-access-block --bucket hivegrid-backups \
|
||||
--public-access-block-configuration \
|
||||
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
|
||||
```
|
||||
@@ -49,13 +49,13 @@ The default encryption method is [age](https://age-encryption.org).
|
||||
|
||||
```bash
|
||||
# Generate a key pair on a trusted workstation
|
||||
age-keygen -o ~/.age-toolctrl-backup.key
|
||||
age-keygen -o ~/.age-hivegrid-backup.key
|
||||
# Output:
|
||||
# Public key: age1example...
|
||||
# Identity (private key) is at ~/.age-toolctrl-backup.key
|
||||
# Identity (private key) is at ~/.age-hivegrid-backup.key
|
||||
|
||||
# Set the public key in the deployment env
|
||||
echo 'BACKUP_AGE_PUBLIC_KEY=age1example...' >> /etc/toolctrl/backup.env
|
||||
echo 'BACKUP_AGE_PUBLIC_KEY=age1example...' >> /etc/hivegrid/backup.env
|
||||
```
|
||||
|
||||
**Store the identity file (private key) somewhere the running app does not have
|
||||
@@ -75,7 +75,7 @@ If the operator already has a GPG fleet, set `BACKUP_ENCRYPTION=gpg` and
|
||||
# Backup bucket
|
||||
BACKUP_S3_ENDPOINT=https://s3.your-provider.com
|
||||
BACKUP_S3_REGION=us-east-1
|
||||
BACKUP_S3_BUCKET=toolctrl-backups
|
||||
BACKUP_S3_BUCKET=hivegrid-backups
|
||||
BACKUP_S3_ACCESS_KEY_ID=AKIA...
|
||||
BACKUP_S3_SECRET_ACCESS_KEY=...
|
||||
BACKUP_S3_FORCE_PATH_STYLE=true # MinIO/R2; AWS uses host-style
|
||||
@@ -101,11 +101,11 @@ PgBouncer pool so prepared statements work) or `DATABASE_URL` as a fallback.
|
||||
## 4. Daily cron
|
||||
|
||||
```cron
|
||||
# /etc/cron.d/toolctrl-backup
|
||||
# /etc/cron.d/hivegrid-backup
|
||||
SHELL=/bin/sh
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
MAILTO=ops@example.com
|
||||
0 3 * * * deploy /opt/toolctrl/scripts/cron/backup-daily.sh >> /var/log/toolctrl-backup.log 2>&1
|
||||
0 3 * * * deploy /opt/hivegrid/scripts/cron/backup-daily.sh >> /var/log/hivegrid-backup.log 2>&1
|
||||
```
|
||||
|
||||
Example wrapper:
|
||||
@@ -113,9 +113,9 @@ Example wrapper:
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd /opt/toolctrl
|
||||
node ./packages/cli/bin/toolctrl-cli.mjs backup create
|
||||
node ./packages/cli/bin/toolctrl-cli.mjs backup rotate
|
||||
cd /opt/hivegrid
|
||||
node ./packages/cli/bin/hivegrid-cli.mjs backup create
|
||||
node ./packages/cli/bin/hivegrid-cli.mjs backup rotate
|
||||
```
|
||||
|
||||
For docker-compose deployments:
|
||||
@@ -140,15 +140,15 @@ Run **at least monthly**:
|
||||
|
||||
```bash
|
||||
# 1. Pick yesterday's backup
|
||||
toolctrl-cli backup list
|
||||
hivegrid-cli backup list
|
||||
|
||||
# 2. Verify in-place (creates verify_<uuid>, drops it after)
|
||||
toolctrl-cli backup verify backup-2026-05-17T030000Z-aabbccdd.tar.gz.age
|
||||
hivegrid-cli backup verify backup-2026-05-17T030000Z-aabbccdd.tar.gz.age
|
||||
|
||||
# 3. End-to-end DR drill (restore into a scratch host)
|
||||
DATABASE_URL=postgres://dr-test/restored \
|
||||
BACKUP_AGE_IDENTITY_FILE=/secrets/age-backup.key \
|
||||
toolctrl-cli backup restore backup-2026-05-17T030000Z-aabbccdd.tar.gz.age --yes
|
||||
hivegrid-cli backup restore backup-2026-05-17T030000Z-aabbccdd.tar.gz.age --yes
|
||||
```
|
||||
|
||||
Document the drill outcome in the incident channel or your internal ops ledger.
|
||||
|
||||
Reference in new issue
Block a user