<@U0A71G31CDV> I set up my automated cluster snaps...
# questions-and-troubleshooting
g
@Rocky I set up my automated cluster snapshots on the default volume where I have a small database. It's been 30 minutes and although the command succeded, and the automated snapshots should be made every 10 minutes, I see nothing in the snapshots list or the snapshot jobs list:
Copy code
mysql> ADMIN SHOW FRONTEND CONFIG like "automated%";
+---------------------------------------------+------------+-------+------+-----------+---------+
| Key                                         | AliasNames | Value | Type | IsMutable | Comment |
+---------------------------------------------+------------+-------+------+-----------+---------+
| automated_cluster_snapshot_interval_seconds | []         | 600   | long | true      |         |
+---------------------------------------------+------------+-------+------+-----------+---------+
1 row in set (0.01 sec)

mysql> SELECT * FROM information_schema.cluster_snapshots;
Empty set (0.01 sec)

mysql> SELECT * FROM information_schema.cluster_snapshot_jobs;
Empty set (0.00 sec)
r
The reason you are not seeing any snapshots is likely because automated cluster snapshots are only triggered after a metadata checkpoint (when a new metadata image file is created). In a small or idle database, the system may not have reached the default threshold to trigger a checkpoint automatically. By default, StarRocks triggers a checkpoint after 50,000 edit log entries. 1. Verify the Feature is Enabled Setting the configuration
automated_cluster_snapshot_interval_seconds
is not enough to activate the feature. You must explicitly enable it with the following command (which persists the state):
Copy code
sql
ADMIN SET AUTOMATED CLUSTER SNAPSHOT ON [STORAGE VOLUME <storage_volume_name>];
If you don't specify a storage volume, it uses the default one. 2. Force a Metadata Checkpoint To confirm the feature is working without waiting for 50,000 logs, you can manually trigger a metadata checkpoint:
Copy code
sql
ALTER SYSTEM CREATE IMAGE;
This command forces the Leader FE to create a new metadata image. Once the image is successfully created, the automated snapshot task should be triggered within the next 10 minutes (based on your 600s interval). 3. Troubleshooting & Validation * Check Job Progress: If a snapshot starts, it will appear in
information_schema.cluster_snapshot_jobs
. If this table is empty, no task was triggered. * Check FE Logs: Search
fe.log
on the Leader FE for: *
triggering a new checkpoint manually...
(started by
ALTER SYSTEM CREATE IMAGE
) *
finished save image...
(checkpoint success) * If the snapshot fails, look for
upload image failed
or
Exception when generate new image file
. * Requirements: * Ensure you are using StarRocks v3.4.2 or later. * This feature is only available for shared-data clusters. * If using object storage (S3/Azure), verify that the storage volume has write permissions and the endpoint is reachable. If you still see nothing after running
ALTER SYSTEM CREATE IMAGE
and waiting 10 minutes, check your
fe.warn.log
for any upload or permission errors. References • sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md • administration/management/FE_configuration.md • administration/Meta_recovery.md • administration/management/monitoring/alert.md
g
@Rocky what is ``automated_cluster_snapshot_interval_seconds`` specifying exactly ? If I want 3 snapshots per day, should I set this to 28800? Or is it the delay between a new image and the creation of the associated snapshot ?
r
The
automated_cluster_snapshot_interval_seconds
parameter specifies the minimum time interval between two automated snapshot tasks. It acts as a rate-limiter, not a schedule. Here is exactly how it works and how to achieve your goal: 1. The Trigger Mechanism Automated snapshots are not triggered by a timer alone. They are triggered by the metadata checkpoint (image creation) process. * The Workflow: Metadata Checkpoint → New Image File Created → Snapshot Logic Checks Interval → If (Current Time - Last Snapshot Time) >
interval_seconds
, then create a new snapshot. * The Interval: If you set this to
28800
(8 hours), the system will ensure that no more than one automated snapshot is created every 8 hours, even if metadata checkpoints occur every 10 minutes. 2. Can you have 3 snapshots per day? While you can set the interval to
28800
to update the snapshot approximately 3 times a day, there is a critical limitation to keep in mind: * Retention: Currently, StarRocks only retains the latest 1 automated snapshot. * When a new automated snapshot is successfully created, the previous one is automatically deleted. * If you need a history of snapshots (e.g., to keep 3 distinct recovery points), you must use Manual Snapshots instead:
Copy code
sql
    SUBMIT TASK AS CREATE CLUSTER SNAPSHOT <snapshot_name>;
3. Will setting it to 28800 work? If your goal is simply to refresh that single available snapshot every 8 hours (to reduce the overhead of snapshotting too frequently), then yes, set it to
28800
. However, if your database is small and idle (as mentioned in your first message), the snapshot will still not trigger unless a metadata checkpoint happens. In a quiet cluster, checkpoints only happen every 50,000 edit log entries. To ensure those 3 snapshots actually happen, you would need to either: 1. Generate enough write activity to trigger checkpoints. 2. Decrease the checkpoint threshold (
checkpoint_publish_timeout
is not it, it's actually
metadata_checkpoint_interval_seconds
which is the time-based fallback, but primarily it's driven by log count). 3. Manually call
ALTER SYSTEM CREATE IMAGE;
via a cron job/script. Summary * Does it specify a delay after image creation? No, it specifies the minimum gap between the start times of two snapshots. * Does it force a snapshot? No. A checkpoint must occur first. * Recommendation: If you want 3 "versions" of your database per day, use a scheduled script to trigger a Manual Snapshot with a timestamped name, as automated snapshots overwrite themselves. References • administration/cluster_snapshot.md • administration/management/FE_configuration.md • sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md References • administration/management/FE_configuration.md • administration/cluster_snapshot.md • administration/management/BE_configuration.md