Skip to main content

Backup and Restore Overview

Doris supports backup and restore operations on databases, tables, or partitions. You can save data as snapshots to remote storage (S3, Azure, GCP, OSS, HDFS, and so on), and restore it to any Doris cluster when needed.

Applicable Scenarios

ScenarioDescriptionRecommended Operation
Accidental data deletion recoveryA table or partition is deleted by mistake and must be restored to a specific point in timeRestore a specific table or partition
Periodic disaster-recovery backupBack up an entire database periodically to guard against cluster failures or hardware damageBack up the entire database
Cross-cluster data migrationMigrate data from a source cluster to a target clusterBackup then Restore
Test environment data preparationRestore certain production tables or partitions to a test clusterBack up specific tables then Restore
Near-incremental backupBack up only new or changed partitions to approximate an incremental backupBack up specific partitions

Core Concepts

ConceptDefinition
SnapshotA point-in-time capture of the data in a database, table, or partition. You must specify a snapshot label when creating it, and a timestamp is generated upon completion. A snapshot is uniquely identified by its Repository, label, and timestamp.
RepositoryThe remote location where backup files are stored. Supported targets include S3, Azure, GCP, OSS, COS, MinIO, HDFS, and other S3-compatible storage.
Backup operationCreates a snapshot of the target object, uploads the snapshot files to a Repository, and stores the related metadata.
Restore operationDownloads a snapshot from a Repository and restores it to the target Doris cluster.

Prerequisites

  • Privileges: The executing account must have the ADMIN privilege.
  • Deployment mode: Only the integrated storage-compute mode is supported. The storage-compute separation mode does not support backup and restore.

Limitations

LimitationDescription
Storage-compute separation not supportedBackup and restore are unavailable in the deployment mode where storage and compute are decoupled.
Asynchronous materialized views (MTMV) not supportedAsynchronous materialized views are not included in backups and must be rebuilt manually after restore.
Tables with storage policies not supportedTables that use a storage policy do not support backup and restore.
Only full backup is supportedIncremental backup is not currently supported. You can back up specific partitions to approximate the effect of incremental backup.
colocate_with attribute is not retainedYou must reconfigure the colocate_with attribute of colocated tables after restore.
Dynamic partitioning must be enabled manuallyAfter restore, enable the dynamic partition attribute manually with ALTER TABLE.
Single-task concurrencyOnly one backup or restore task can run at a time within the same database.

Operation Guides

  • Backup: Create a Repository and perform a full backup of a database, table, or partition.
  • Restore: Restore a database, table, or partition from a Repository snapshot to the target cluster.