Skip to main content

Disaster Recovery Overview

Doris provides complete disaster recovery capabilities that help you handle data loss risks caused by hardware failures, software errors, and human operation mistakes. By combining cross-cluster data replication, backup and restore, and recycle bin recovery, you can ensure high availability and reliability of data across different failure granularities.

Applicable Scenarios

Different disaster recovery capabilities apply to different failure scenarios. Combine them based on your business needs:

CapabilityApplicable ScenarioRecovery GranularityRecovery SpeedTypical Use Case
Cross-cluster data replicationCluster-level, data-center-level, or region-level failuresCluster, database, tableSeconds to minutes (near real-time)Multi-region active-active, region-level disaster recovery, read-write separation
Backup and restoreData corruption, long-term archiving, migrationDatabase, table, partitionMinutes to hours (depending on data volume)Periodic snapshots, cross-cluster migration, compliance archiving
Recycle bin recoveryShort-term human errors such as accidentally dropping tables or databasesTable, databaseSecondsAccidental deletion recovery, short-term retention

Capability Comparison

The three capabilities differ in data protection strength, operational cost, and dependencies:

DimensionCross-cluster Data ReplicationBackup and RestoreRecycle Bin Recovery
Data timelinessReal-time (full + incremental)Periodic snapshotsRetained at the moment of deletion
External dependenciesRequires an additional target Doris clusterRequires remote storage such as object storage or HDFSNone (retained locally within the cluster)
Retention periodContinuous replicationRetained according to backup policyConfigurable retention period, automatically cleaned up on expiration
Operational costHigh (operating two clusters)Medium (periodic jobs + storage cost)Low (enabled by default)

1. Cross-cluster Data Replication

Doris Cross-Cluster Replication (CCR) supports real-time data replication between different Doris clusters. It ensures that critical data is distributed across multiple physically isolated clusters, enabling region-level disaster recovery.

Key Features

  • Real-time replication: Supports both full and incremental replication. Full replication copies all data during the initial stage; incremental replication continuously captures and synchronizes data changes, including data changes (inserts, updates, deletes) and schema changes (DDL).
  • Data consistency: Records data changes through a log mechanism (such as Binlog) to ensure the target cluster is fully consistent with the source cluster.
  • Region-level disaster recovery: Supports replication between clusters in different geographic locations. When one cluster fails, other clusters can quickly take over the workload.
  • Multi-scenario application: Applicable to disaster recovery backup, workload separation (such as read-write separation), and active-active cluster scenarios.

Example Scenario

A company deploys two Doris clusters in different cities, with cluster A as the primary and cluster B as the backup. With cross-cluster data replication, when cluster A is interrupted by a natural disaster, cluster B can take over the workload and minimize downtime.

For detailed usage, see Cross-Cluster Replication Overview, Quick Start, and User Manual.

2. Backup and Restore

Doris provides backup and restore functionality for periodically saving data snapshots, preventing data loss caused by unexpected events, and supporting data migration and long-term archiving.

Key Features

  • Backup: Supports full backup of specified databases, tables, or partitions, saving complete data snapshots.
  • Restore: Supports restoring databases, tables, or partitions from snapshots.

Example Scenario

A company periodically backs up its data and stores the backup files in an object storage service (such as Amazon S3). When an important table is dropped by mistake, the backup feature quickly restores the lost data and ensures normal business operations.

For detailed usage, see Data Backup and Data Restore.

3. Recycle Bin Recovery

Doris provides a recycle bin feature that offers a quick way to recover recently deleted data and reduce the impact of operational mistakes.

Key Features

  • Temporary deletion: Tables or databases that are dropped are moved to the recycle bin first instead of being permanently deleted immediately.
  • Retention period: Deleted data is kept in the recycle bin for a configurable period, during which you can choose to restore it.
  • Quick recovery: Easily recover mistakenly deleted data from the recycle bin without going through a full backup and restore process.
  • Data safety: If recovery is not needed, data in the recycle bin is automatically cleaned up after the retention period.

Example Scenario

A team accidentally drops an important table during routine operations. With the recycle bin feature, they quickly recover the deleted data, avoid a complex backup and restore process, and keep the business running.

For detailed usage, see Recycle Bin.

FAQ

Q: I accidentally dropped a table. Which feature should I use to recover it?

Use recycle bin recovery first. It completes in seconds and does not depend on external storage. If the retention period has passed, use backup and restore to recover from the most recent snapshot.

Q: Can cross-cluster replication and backup and restore replace each other?

No. Cross-cluster replication targets real-time disaster recovery and high availability, while backup and restore targets periodic snapshots and long-term archiving. Combine them to cover different failure scenarios.

Q: Does data in the recycle bin stay there forever?

No. Deleted data is only kept during the configurable retention period and is automatically cleaned up after expiration. For long-term retention, use backup and restore.

Q: How do I achieve region-level disaster recovery?

Use cross-cluster data replication to deploy primary and standby Doris clusters in different regions. When the primary cluster fails, the standby cluster takes over the workload.

Q: Where can backup files be stored?

Backup files support remote storage such as object storage (for example, Amazon S3) and HDFS, which avoids single-point failures shared with the source cluster.