toga-ai 1.0.1194 → 1.0.1195

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.
@@ -5,5 +5,6 @@
5
5
  | [Worker 1.5 (1.0 Framework) Architecture](architecture.md) | The single-server 1.0 cron tier that replaced worker's 7-role fleet; open for how the crontab is built from schedules/*.json, the overlap check, and what the cr |
6
6
  | [worker1.5 — Committed Secrets & Credentials in Logs (debt register)](features/committed-secrets-and-log-exposure.md) | Open security debt in worker1.5: a GitHub token committed in `ebs/git.json` and a cron that writes OptimumDesk passwords into the cron log; open before touching |
7
7
  | [worker1.5 cron overlap guard (isProcessRunning, crontab shell, manual runs)](features/cron-overlap-guard.md) | How the 1.0 "already running" check decides a cron exits, why the crontab must use /bin/sh, and how to run a cron by hand on worker15 without it exiting; open w |
8
+ | [Database backups (database_backup_infrastructure.php) — legacy asidbarchives bucket and the new locked prod bucket](features/database-backups.md) | Where prod database backups are written (legacy asidbarchives vs new locked bucket togatech-database-backup-production), how the backup cron thins files, the pr |
8
9
  | [worker1.5 PHP ini overrides on EB AL2023 (memory_limit 11G, zz-application.ini, cron log_errors=0)](features/php-ini-memory-limit-eb.md) | How worker1.5 sets PHP ini values (memory_limit 11G, cron `log_errors=0`) on EB `worker15-production`; open before changing any PHP ini setting or the cron comm |
9
10
  | [Diagnosing worker1.5 crons that stopped running (single-server 1.0 tier)](workflows/diagnosing-crons-not-running.md) | Steps to tell "worker1.5 crons are not running" from "a downstream system is failing", find the cause on the box, and recover, plus how to triage failing crons |
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: Database backups (database_backup_infrastructure.php) — legacy asidbarchives bucket and the new locked prod bucket
3
+ framework: "1.0"
4
+ repo: worker1.5
5
+ project: Worker 1.5
6
+ client: shared
7
+ type: feature
8
+ status: active
9
+ updated: 2026-10-29
10
+ owners: ["rgirish"]
11
+ files:
12
+ - worker1.5/crons/database/database_backup_infrastructure.php
13
+ - worker1.5/schedules/cron.worker.json
14
+ related:
15
+ - ../architecture.md
16
+ - ../workflows/diagnosing-crons-not-running.md
17
+ - ../../../../standalone/apps/bastion/features/dbdump.md
18
+ ---
19
+
20
+ Where prod database backups are written (legacy asidbarchives vs new locked bucket togatech-database-backup-production), how the backup cron thins files, the prod Aurora topology, and the open risks (backups OFF since 2026-10-22, 30-day thinning vs 35-day lock); open before touching backups or the bucket.
21
+
22
+ ## Summary
23
+
24
+ The cron `crons/database/database_backup_infrastructure.php` (worker1.5, moved from `worker`) runs `mysqldump` per database and writes gzip files to an s3fs mount. Today it targets the **legacy** bucket `asidbarchives`. A **new, locked** bucket `togatech-database-backup-production` was built (TRUE-83338) to replace it, but nothing writes to it yet.
25
+
26
+ **⚠ Backups are OFF since 2026-10-22.** In worker1.5 `_main`, `schedules/cron.worker.json` row "Database Backups" is `"active":0` (set when worker 1.0 crons moved to worker1.5). Newest file in `asidbarchives`: `Core_20261022_142038.sql.gz`.
27
+
28
+ ## How it works
29
+
30
+ ### Legacy path (current cron target)
31
+
32
+ - Bucket `asidbarchives`, legacy account **502614707982**, **us-west-2**. No versioning, no Object Lock, no Block Public Access, no lifecycle, SSE AES256 only. Anyone with write access can wipe it.
33
+ - Mounted with s3fs at `/var/app/asidbarchives`; cron writes `<Database>/<YYYY-MM>/<DD>/<Database>_<YYYYMMDD>_<HHMMSS>.sql.gz`.
34
+ - The cron deletes old files itself, per-database args: keep all for 30 days, hourly to 90, daily to 360, weekly to 720 days.
35
+ - DB credentials are in the cron file itself (plaintext). Never copy them out; see [committed secrets](committed-secrets-and-log-exposure.md).
36
+
37
+ ### New bucket (TRUE-83338, built 2026-10-29, empty)
38
+
39
+ | Setting | Value |
40
+ |---|---|
41
+ | Name | `togatech-database-backup-production` |
42
+ | Account / region | **654654170868** (new prod) / **us-east-1** (same region as the Aurora writers) |
43
+ | Versioning | on |
44
+ | Encryption | SSE-KMS, customer-managed key `alias/togatech-database-backup`, Bucket Key on, yearly key rotation on |
45
+ | Public access | all 4 Block Public Access on |
46
+ | Object ownership | BucketOwnerEnforced (ACLs off) |
47
+ | Object Lock | enabled at creation; default retention **GOVERNANCE 35 days** |
48
+ | Tags | `Name`, `Ticket=TRUE-83338`, `Purpose=database-backup` |
49
+ | Not yet built | lifecycle rule, bucket policy, IAM writer role |
50
+
51
+ Proven: a test object got `aws:kms` + GOVERNANCE lock; delete without bypass failed `Access Denied because object protected by object lock.`; removal needed `--bypass-governance-retention`.
52
+
53
+ Decisions (rgirish, 2026-10-29):
54
+ - Backup bucket **only in prod** (654654170868). None in non-prod account 975050298201 — non-prod data needs no backups.
55
+ - Name pattern `togatech-<purpose>-production`.
56
+ - Region us-east-1 because the DB writers are there.
57
+
58
+ ### Prod 2.0 database topology (what gets backed up)
59
+
60
+ - Account 654654170868 has 5 Aurora MySQL **global databases**: `production-core-global`, `production-client-global`, `production-logs-global`, `production-archive-global`, `production-cache-global`.
61
+ - Writer cluster `production-<family>-1` in **us-east-1**; read-only secondaries `-2` in us-west-2 and `-3` in eu-west-1. `writer.core.database.togahub.com` → `production-core-1`.
62
+ - Talos Postgres `production-talos` is also us-east-1.
63
+ - Legacy account 502614707982 still holds old us-west-2 clusters: `prod-cluster`, `production-logs-cluster`, `beta1`, `demo1`, `gamma`, `gamma1`, `hotfix1`, `stage1`.
64
+ - us-west-1 RDS calls are denied by an org SCP.
65
+
66
+ ## Gotchas
67
+
68
+ - **30-day thinning vs 35-day lock.** Pointed at the new bucket as-is, the cron's deletes of day-30+ detailed files fail (GOVERNANCE blocks deletes before day 35). Before switching, pick one: lock 30 days, change the cron's thinning, or drop cron deletes and let an S3 lifecycle rule clean up.
69
+ - Switching the writer also needs an IAM role + bucket policy for the writer, and KMS `GenerateDataKey`/`Decrypt` on the key.
70
+ - Re-enabling only means setting `"active":1` on that row and deploying worker1.5 — but it still writes to the legacy, unprotected bucket.
71
+
72
+ ## Change history
73
+ - 2026-10-29 — New prod backup bucket `togatech-database-backup-production` built (locked 35 days, KMS); found backups OFF since 2026-10-22 and the thinning-vs-lock conflict (TRUE-83338) (rgirish)
@@ -7,7 +7,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
7
7
  - **library** (Library) _(framework core)_ — 41 doc(s) → [1.0/apps/library/INDEX.md](1.0/apps/library/INDEX.md)
8
8
  - **worker** (Worker) — 42 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
9
9
  - **dbchanges** (Database Changes) _(framework core)_ — 1 doc(s) → [1.0/apps/dbchanges/INDEX.md](1.0/apps/dbchanges/INDEX.md)
10
- - **worker1.5** (Worker 1.5) — 8 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
10
+ - **worker1.5** (Worker 1.5) — 9 doc(s) → [1.0/apps/worker1.5/INDEX.md](1.0/apps/worker1.5/INDEX.md)
11
11
  - **togadesk** (TOGa Desk) — 19 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
12
12
  - **togaview** (TOGa View) — 9 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
13
13
  - **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.1194",
3
+ "version": "1.0.1195",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",