StarRocks backup · design note
Fast undo comes from small, targeted backups, not from rewinding the bucket
Engineers ship fast with AI, so data mistakes will happen. Keep point-in-time restore, cut the 30-day daily snapshots, and add the cheap layers that actually undo a mistake in minutes.
Why rewinding fails
Rewinding the whole bucket is not an undo button
Files and metadata drift apart
Data files live in S3, but table metadata lives in the FE nodes. Rewind only the files and the cluster likely no longer matches them.
It rewinds every shop
A bug usually breaks a few tables or shops. A bucket rewind also throws away every correct write since that moment.
Hours, not minutes
The December 2025 restore into starrock-data-v2 took 7 jobs on 16–17 Dec, 2 of them failed. No record says whether StarRocks ran on it afterwards.
The design
Five layers, cheapest first
No DROP/TRUNCATE rights for app and AI users. Prod DDL only through a reviewed migration. Try risky changes on a dev copy first.
StarRocks recycle bin: RECOVER TABLE …. Raise catalog_trash_expire_second from 1 day to 3–7 days.
BACKUP SNAPSHOT of the affected tables automatically before every prod DDL or backfill; keep 7 days; restore that table only.
Rerun the backfill from the source (Mongo, Shopify) for those shops. StarRocks data can be rebuilt from its source.
Point-in-time restore (2 days) plus ~7 daily snapshots, with FE metadata backed up at the same moment.
MongoDB is the real source of truth, so point-in-time restore matters most there. Whether Atlas continuous backup is on is not yet checked.
Side note
Moving ad-insights to StarRocks saves money only if Mongo drops a tier
Share of Mongo
Atlas bills by cluster tier. If ad-insights is a small share of storage and working set, moving it saves nothing.
More StarRocks churn
Facebook updates today’s row until day end. In StarRocks that means primary-key upserts, more compaction, more S3 requests and more backup churn.
Duplicates fixed by design
A primary-key table cannot hold two rows for one key, which removes the cause of the TPCS-5375 duplicate docs.
Before changing anything
Five read-only checks, then one drill
- Is StarRocks in shared-data mode, which version, and does
BACKUP/RESTOREwork in that mode? - Current value of
catalog_trash_expire_second. - Is FE metadata backed up anywhere?
- Did the December 2025 restore into
starrock-data-v2actually run StarRocks? - Is Atlas continuous backup on for the production cluster?
- Drill: restore point-in-time to a test bucket, start a dev StarRocks on it, count rows. If it fails, today’s backup is a false sense of safety. Change retention only after it passes.
Sources
AWS Backup plan and recovery points, prod, read 2026-10-23 · AWS Cost Explorer, Jun–Oct 2026 · S3 BucketSizeBytes (CloudWatch) · vault note product-knowledge/03-engineering/investigations/2026-10-23-technical-research-starrocks-fast-undo-backup.md.