Radostin Emanuilov
03/27/2026, 10:07 AMpersistentVolumeClaimRetentionPolicy for the FE nodes the data (DBs and their tables do not exist) cannot be queried if I install the chart again connected to the same S3 bucket
Rocky suggested that Cluster Snapshot is similar, it is however:
• If that is the only option StarRock's shared data separated compute from data claim is not entirely true, because:
◦ One would assume on deleting the cluster and re-creating it using the same storage (s3) they'd be able to pick up where they left of and here this is not autoamtic
• For shared data clusters it should not backup the data also as is stored in S3/elsewhere already
• There's no FE config way to enable Cluster Snapshot for all storage volumes
• There's no simple way to auto restore the cluster
◦ The word disaster recovery when it means restore is a bit scary, especially to a new user like me, this doc does explain how to do it which is nice though, but is manual and have to set a specific snapshot to be used
In my opinion it would be more user friendly to have the following flow:
1. User enables cluster snapshot for metadata only for all storage volumes via a FE config
2. User enables automatic restore via a kube-starrocks config
3. User does helm install to spawn a new cluster, it backs up its FE metadata every X seconds
4. User does helm uninstall, deletes the PVCs
5. User does helm install using the same unchanged config, the cluster picks up the latest snapshot and restores it automatically without the user having to think about it
An even neater approach would be:
• Write the FE metadata to S3, then cache it locally and read it from there the same logic the CE nodes use
◦ This way the whole recovery process wouldn't be needed and can be used only for actual disaster recovery
◦ Should be considered how often, when/why is the metadata written to and how it would affect performance
What do people think?Radostin Emanuilov
03/27/2026, 10:15 AMRocky
03/27/2026, 10:15 AMRadostin Emanuilov
03/27/2026, 10:15 AMpersistentVolumeClaimRetentionPolicy for the FE nodes the data (DBs and their tables do not exist) cannot be queried if I install the chart again connected to the same S3 bucket
If no better solution exists I'm proposing:
• FE nodes store their metadata data in S3, using the same logic the CE nodes use cache it locally and read it from there.
◦ Things to consider here would be
▪︎ what exactly is FE metadata/how often is it written to
• depending on this it might be better to do sync with S3 on graceful shutdown/boot instead of writing to S3 first then reading from local cache if it affects query latencyRocky
03/27/2026, 10:16 AMmeta directory (backed by PVCs in Kubernetes).
As of today, here are the best practices for handling this scenario:
1. The Modern Solution: Cluster Snapshot (v3.4.2+)
Your proposal—storing FE metadata in S3 to allow for cluster-wide recovery—is exactly what the StarRocks team has implemented with the Cluster Snapshot feature.
Introduced in v3.4.2, Cluster Snapshot is designed specifically for disaster recovery and cluster migration in shared-data mode. It automatically ensures that the full cluster state (metadata + data) is persisted in object storage.
* How it works: The FE periodically syncs a snapshot of its metadata to S3.
* Why it helps you: If you delete your cluster (including FE PVCs), you can start a new cluster and point it to the snapshot in S3. The new Leader FE can bootstrap itself from that snapshot using the --cluster_snapshot startup flag.
* Best Practice: Upgrade to v3.4.2+ and enable Cluster Snapshot. This removes the hard dependency on FE PVCs for long-term data preservation.
2. The Infrastructure Best Practice: FE PVC Retention
If you are on an older version or simply want to keep the cluster "warm" between uninstalls, you should configure your Kubernetes environment to treat FE PVCs as "precious" state:
* Retention Policy: Ensure your persistentVolumeClaimRetentionPolicy for the FE StatefulSet is set to Retain (or just don't delete them during helm uninstall).
* Re-attachment: When you reinstall the Helm chart, ensure it uses the same metadata.name and volume claims so that the new FE pods mount the old metadata.
_ _Note:* FE nodes must be started in a specific order if you are recovering from a completely stopped state to ensure the Leader (which has the latest edit logs) is elected correctly.
3. Alternative: Table-level BACKUP/RESTORE
If you need to move data between entirely different S3 paths or different cluster versions where Cluster Snapshot isn't an option:
* You can use the BACKUP command to create a snapshot of specific databases/tables into an S3 repository.
* The RESTORE command can then be used in a fresh cluster to "import" that data.
_ _Note:* This is more manual than Cluster Snapshot but is very robust for migration.
Regarding your Proposal
Your logic about caching and syncing metadata is very close to how the internal implementation of Cluster Snapshot and the FE's BDBJE (Berkeley DB Java Edition) handles things. The FE metadata is updated frequently (every transaction), so writing directly to S3 for every small metadata change would indeed introduce unacceptable latency for SQL DDL/DML.
Instead, StarRocks uses a checkpointing mechanism:
1. FE writes metadata locally (high performance).
2. Periodic checkpoints/snapshots are taken.
3. These snapshots are then uploaded to S3.
Summary Recommendation:
If you want to be able to delete your cluster and delete PVCs while keeping everything queryable later, upgrade to v3.4.2+ and use the Cluster Snapshot feature. It was built specifically to solve the exact problem you've identified!
References
• administration/cluster_snapshot.md
• administration/management/Backup_and_restore.md
• deployment/shared_data/s3.md
• deployment/shared_data/hdfs.md
• deployment/shared_data/minio.md
• deployment/shared_data/gcs.mdRadostin Emanuilov
03/27/2026, 10:19 AMRocky
03/27/2026, 10:19 AMimage file and cleans up old edit logs to prevent them from growing indefinitely.
* Location: By default, these files are located in the ${STARROCKS_HOME}/meta directory (configurable via meta_dir).
Note: Because the metadata is the "brain" of the cluster, it is highly recommended to deploy at least three FE Follower nodes to ensure high availability and metadata redundancy.
References
• knowledge/admin_and_operation/shared_data_compaction.mdRadostin Emanuilov
03/27/2026, 10:25 AMRocky
03/27/2026, 10:25 AMautomated_cluster_snapshot_interval_seconds: Default is 600 (10 minutes). Increasing this value reduces the frequency of FE metadata uploads.
* make_snapshot_worker_count: (BE configuration) Controls the maximum number of threads for snapshot tasks on a BE node (though this is primarily relevant for manual or legacy snapshot tasks).
Summary
In general, Cluster Snapshot is a low-overhead feature because it leverages the existing shared-data architecture. The performance impact is mostly limited to periodic FE resource spikes for metadata synchronization rather than any sustained impact on query throughput or data loading.
*Note: This is currently a Beta feature. It is recommended to monitor FE performance and object storage egress costs when enabling it in a production environment.*
References
• administration/cluster_snapshot.md
• faq/shared_data_faq.md
• best_practices/primarykey_table.mdRadostin Emanuilov
03/27/2026, 10:56 AMRocky
03/27/2026, 10:57 AMBACKUP and RESTORE SQL commands (typically for shared-nothing clusters), these also back up both data and the associated metadata.
* Data: It creates a physical snapshot of the data (tablets/rows) and uploads it to your backup repository (S3, HDFS, etc.).
* Metadata: It saves the schema, partitioning information, and (from v3.4.0 onwards) can also include external catalog metadata, logical views, and UDFs.
* Granularity: Unlike a full cluster snapshot, this can be done at the database, table, or partition level.
Summary
In both cases, StarRocks ensures that you aren't just backing up "labels" or "names" (metadata). The actual row-level data stored inside your tables is included in the backup/snapshot.
Key Version Note:
* Cluster Snapshot (Full cluster DR) is only available for shared-data clusters starting from v3.4.2.
* BACKUP/RESTORE (Granular) is for shared-nothing clusters. Shared-data clusters do not support the standard BACKUP and RESTORE syntax; they rely on Cluster Snapshots instead.
References
• administration/management/Backup_and_restore.mdRadostin Emanuilov
03/30/2026, 8:36 AMKevin Cai
03/30/2026, 9:52 AMRadostin Emanuilov
03/30/2026, 1:11 PMRadostin Emanuilov
03/30/2026, 1:18 PMKevin Cai
03/30/2026, 1:40 PMRadostin Emanuilov
03/30/2026, 1:46 PMKevin Cai
03/30/2026, 1:55 PMKevin Cai
03/30/2026, 1:56 PMRadostin Emanuilov
03/30/2026, 1:59 PMKevin Cai
03/30/2026, 2:03 PMRadostin Emanuilov
03/30/2026, 2:04 PMRadostin Emanuilov
03/30/2026, 2:07 PMKevin Cai
03/30/2026, 2:14 PMRadostin Emanuilov
03/30/2026, 2:21 PM