Overview
In a shared-data cluster, data files are stored in object storage, while FE metadata is stored locally. A cluster snapshot saves an FE metadata image and preserves the data needed to restore the cluster to that point in time. Use a manual snapshot to retain a specific restore point, or use cross-region incremental replication to keep a recovery copy in another region.Workflow

Terms
- Cluster snapshot A cluster snapshot refers to a snapshot of the cluster state at a certain moment. It contains all the objects in the cluster, such as catalogs, databases, tables, users & privileges, loading tasks, and more. It does not include all external dependent objects, such as configuration files of external catalogs, and local UDF JAR packages.
- Generating cluster snapshot The system replaces older automated snapshots as new ones complete. You can keep multiple named manual snapshots until you drop them.
- Cluster Restore Restore the cluster from a snapshot.
Automated cluster snapshot
Automated Cluster Snapshot is disabled by default. Use the following statement to enable this feature: Syntax:INTERVAL <value> <unit>: The interval at which automated snapshots are created. value must be a positive integer, and unit must be one of SECOND, MINUTE, HOUR, DAY, and WEEK. If this parameter is not specified, the interval is controlled by the FE configuration item automated_cluster_snapshot_interval_seconds.
storage_volume_name: Specifies the storage volume used to store the snapshot. If this parameter is not specified, the built-in storage volume builtin_storage_volume is used, even if another storage volume is set as the default. If builtin_storage_volume does not exist (for example, because enable_load_volume_from_conf is false), the statement fails, and you must specify a storage volume. For details on creating a storage volume, see CREATE STORAGE VOLUME.
snapshot_scope: Use local (the default) for recovery within the same region, or external to replicate data to the specified storage volume for cross-region recovery.
Each time the snapshot interval has elapsed since the previous automated snapshot started, the Leader FE performs a metadata checkpoint to create a new metadata image, and creates a snapshot from it. The name of the snapshot is generated by the system, following the format automated_cluster_snapshot_{timestamp}.
Metadata snapshots are stored under /{storage_volume_locations}/{service_id}/meta/image/automated_cluster_snapshot_timestamp. With snapshot_scope=local, data files stay in their original location.
FE configuration item automated_cluster_snapshot_interval_seconds controls the snapshot automation cycle when no INTERVAL is specified for the feature. The default value is 600 seconds (10 minutes).
Use the following statement to change the interval while the feature is enabled (supported from v4.0.5 onwards, as is the INTERVAL clause):
Disable automated cluster snapshot
Use the following statement to disable automated cluster snapshot:external.
Cross-region incremental replication
Cross-region incremental replication supports only external automated snapshots (snapshot_scope=external). Create the destination storage volume in the recovery region and make sure the source cluster can write to it. If automated snapshots are already enabled, disable them before enabling them with the new scope and destination.
information_schema.cluster_snapshot_jobs and confirm that the job’s state is FINISHED.
Before a recovery, record the completed snapshot’s storage_path from information_schema.cluster_snapshots. Use that full URI in the cross-region recovery configuration.
Manual cluster snapshot
Create a named snapshot before a change for which you want to retain a restore point. The example writes the snapshot to the existing storage volumesnapshot_volume.
FINISHED. To recover the entire cluster, see Restore the cluster. To recover one table, see Restore a table from a manual snapshot. Drop the manual snapshot with DROP CLUSTER SNAPSHOT before_upgrade when you no longer need it. The FE parameter max_manual_cluster_snapshot_jobs controls how many manual snapshots can be retained (default 50).
Cross-region limits for manual snapshots
Manual snapshots always use local scope. Even whenSTORAGE VOLUME points to a remote volume, the snapshot job writes only metadata to that volume. The underlying data files stay in their original storage, so the metadata alone is insufficient for cross-region recovery.
Restore a table from a manual snapshot
On the same shared-data cluster, restore a table from a completed snapshot into a new table. The destination database must exist and the destination table must be absent. For example, restoresales.orders as it was at before_upgrade into sales.orders_restored.
SHOW RESTORE FROM sales to check the job status.
View cluster snapshot
You can query the viewinformation_schema.cluster_snapshots to view the latest cluster snapshot and the snapshots yet to be dropped.
View cluster snapshot job
You can query the viewinformation_schema.cluster_snapshot_jobs to view the job information of cluster snapshots.
Restore the cluster
Follow these steps to restore the cluster with the cluster snapshot.-
To select a named snapshot or recover into a different cluster, configure cluster_snapshot.yaml in the Leader FE’s
fe/confdirectory.- Named manual snapshot. Start with the Appendix template. Set
cluster_snapshot.cluster_snapshot_pathto the full snapshot directory URI fromstorage_pathininformation_schema.cluster_snapshots. Setcluster_snapshot.storage_volume_nameto the snapshot’s storage volume and include that volume instorage_volumes. A path ending in/metaselects an automated snapshot. - Cross-cluster recovery within a region. Use the Appendix template. If the target cluster uses a new storage path, copy all files under the original storage path to the new one.
- Cross-region recovery from an external snapshot. Use the cross-region recovery configuration to read the completed snapshot and map the recovered cluster’s writable storage.
- Named manual snapshot. Start with the Appendix template. Set
-
Start the Leader FE node.
-
Start other FE nodes after cleaning the
metadirectories.Add the nodes to the cluster. -
Start CN nodes after cleaning the
storage_root_pathdirectories.Add the node to the cluster.
Appendix
Template of cluster_snapshot.yaml for cross-cluster recovery:Cross-region recovery configuration
The followingfe/conf/cluster_snapshot.yaml example uses S3 in the recovery region. Replace <completed_external_snapshot_uri> with the storage_path of a finished external snapshot. The target cluster needs read access to snapshot_storage_volume and write access to the locations in storage_volumes. This example uses the AWS SDK default credential chain.
source_data_volume and dr_volume. Include all source storage volume names from your snapshot in storage_volumes and give each a writable location separate from the snapshot location. With the configuration in place, continue with the Leader FE startup step under Restore the cluster.
Limitations
- Currently, standby mode is not supported. The primary and secondary clusters cannot be online simultaneously. Otherwise, the normal operation of the secondary cluster cannot be guaranteed.
- Currently, only one automated cluster snapshot can be retained.