TDengine TSDB Backup and Disaster Recovery

Juno Qiu

July 5, 2026 /

Data is the most important asset for enterprises. TDengine provides complete backup, restoration, and disaster recovery mechanisms to ensure the safety and reliability of time-series data.

1. Backup and recovery overview

TDengine provides these data protection mechanisms:

MechanismDescription
Full backupFull data backup
Incremental backupOnly backs up new data
Scheduled backupAutomatic periodic backup
Remote synchronizationCross-region data replication

2. Backup strategy configuration

2.1 Creating a backup

Use the following SQL commands to create backups:

  • BACKUP DATABASE db_name; creates a full backup.
  • BACKUP DATABASE db_name TO '/path/to/backup'; backs up to a specified path.

2.2 Automatic backup configuration

ALTER DATABASE db_name BUFFER 100 BUFFER 1 BUFFER 1; configures automatic database backup.

3. Recovery operations

3.1 Restoring from backup

RESTORE DATABASE db_name FROM '/path/to/backup';

3.2 Recovery notes

Before restoring, ensure sufficient storage space is available. The database is unavailable during the restoration process, so schedule recovery operations during a maintenance window.

4. Fault tolerance mechanisms

4.1 Multi-replica configuration

CREATE DATABASE demo REPLICA 3 VGROUPS 3;
SHOW dnode;
SHOW VGROUPS;

4.2 Automatic failover

TDengine supports automatic node fault detection, automatic re-election of the primary replica, and automatic data rebalancing. When a data node fails, the system handles failover without manual intervention.

5. Remote disaster recovery

5.1 Data synchronization architecture

The remote disaster recovery topology consists of a primary site (production environment) connected to a disaster recovery site (remote deployment) through real-time data synchronization.

5.2 Synchronization configuration

CREATE TOPIC topic_name AS SELECT * FROM db_name;
taosBenchmark -c config -y -B topic_name

Data Subscription (TMQ) enables real-time cross-region replication by publishing data changes to a topic and having the remote site consume those changes.

6. Disaster recovery drill

Regular disaster recovery drills should include these steps:

  1. Simulate a primary site failure.
  2. Verify data integrity after failover.
  3. Test failover procedures end to end.
  4. Record recovery time objectives and results.

Summary

  1. Develop backup strategies based on business requirements.
  2. Configure an appropriate number of replicas for high availability.
  3. Deploy remote disaster recovery for extreme situations.
  4. Conduct regular disaster recovery drills.