Edge, Cloud, and Data Diodes
To aggregate edge TDengine data at a central site, use edge push or central pull where networks can communicate. A strictly one-way data diode requires file transfer. Push and pull describe where taosX runs and which side initiates connections; the data direction remains unchanged. Check reading, transport, and writing separately during deployment and recovery.
Where to operate: with network connectivity, use System Management → Data Synchronization in taosExplorer, Data In tasks, or taosx run. With a strictly one-way data diode, run taosx run separately on the sending and receiving sides, with files transferred by the diode vendor's tool.
A strictly one-way data diode does not allow the return traffic required by ordinary TCP sessions. WebSocket or TMQ connections cannot pass directly through it.
1. Choose the Network Path
| Condition | Recommended method | Actual connections |
|---|---|---|
| The center can access the edge | Run a pull task at the center. | Central taosX accesses both the edge source and central target. |
| The edge can only initiate outbound connections | Run a push task at the edge. | Edge taosX accesses both the edge source and central target. |
| Networks are completely isolated and only file transfer is allowed | Generate incremental files on the sending side and restore the chain on the receiving side. | Each taosX connects to its local-network cluster; vendor tools transfer files. |
“Initiating outbound connections” still requires protocol responses over those connections; it is not physically one-way communication. Have the network administrator confirm actual session paths, ports, and authentication. Do not resolve connectivity by disabling certificate verification.
2. Minimal Configuration with Network Connectivity
- Have an authorized TDengine TSDB administrator prepare a separate central target database and confirm precision, retention, and write permissions.
- Use the table above to determine whether the task runs at the edge or center. Check both endpoints from that taosX host.
- Follow TMQ Continuous Synchronization to create a one-way task for one test database, fixing the source topic, consumer group, and target database. For history only, use TDengine Query Migration.
- Write two recognizable new timestamps at the edge. Query temperature, tags, and object names at the center using the same timestamps.
- Record end-to-end delay and source retention settings before expanding to other objects.
For multiple edge sources, initially isolate each in a separate target database. Before combining them in one database, define collision-prevention rules. Different sources writing the same child table and primary key can overwrite each other; business objects are not automatically merged.
Each segment in the diagram is a separately configured and verified transfer task. For example, first verify records from Workshop 1 to Operating Area 1, then verify the same records in the corresponding central target database. When data is missing at the center, check segment by segment, not just the final central segment's runtime status. Multilevel transfer adds each segment's delay and recovery conditions. Insufficient source retention on any segment can create gaps; the next segment being online does not prove the whole chain is healthy. Arrows show data direction. Choose edge push or central pull according to network conditions above.
2.1 Four Connected-Network Combinations
| Method | Task execution location | Configuration focus |
|---|---|---|
| Edge push with subscription | Edge taosX | Local source subscription DSN and central target DSN; the center accepts connections initiated by the edge. |
| Edge push with queries | Edge taosX | Local source query DSN and central target DSN; define bounded history or continuous-query mode. |
| Central pull with subscription | Central taosX | Edge source subscription DSN and local target DSN; the edge accepts connections initiated by the center. |
| Central pull with queries | Central taosX | Edge source query DSN and local target DSN; also verify query times, windows, and backfill scope. |
Configure subscription objects, groups, and starting positions according to TMQ Continuous Synchronization. Configure query objects, start/end times, and transformations according to TDengine Query Migration. Do not start the same configuration on both sides; that can create duplicate links. Subscription cannot exceed source WAL retention, and queries do not automatically establish a consistent snapshot of continuously changing data.
GUI Data In tasks write to their own cluster. For central pull, select the edge source in central taosExplorer. For continuous edge-to-remote push, use Data Synchronization below. Query push can use taosx run, explicitly setting the local source and remote target. Opening a browser at the edge does not turn a Data In task's target into the remote cluster. Each localhost refers to the actual task execution host, not the opposite cluster.
2.2 Continuously Push from Edge to Center
Before starting, have the administrator prepare the central target database and confirm source WAL retention, licenses on both sides, account permissions, and connectivity from edge taosX to the center. For topic filtering, queries, or renaming, use the corresponding task guide. This entry point's database selector is not an arbitrary SQL field.
- Log in to taosExplorer connected to the edge cluster. Open System Management → Data Synchronization and click Create New Synchronization.
- Under Source, select the approved edge database. The list shows source databases in the currently connected cluster.
- In Target DSN, enter the central protocol, address, port, account, and target database, such as
taos+ws://<目标用户>:<编码后的目标密码>@<中心主机>:6041/site_a_central. Native connections use the correspondingtaos://and port. Do not copy the gray example address unchanged. - Confirm source, target, replication scope, and existing tasks, then click OK. In the list, record the task ID, source database, and target DSN. Inspect Status and Reason. If creation fails, retain the error and fix networking, licensing, or permissions first. Do not repeatedly create the same mapping.
- Write and verify known new records using this section's minimal configuration procedure. Task existence or healthy status does not replace central data verification. Use the row's start/stop controls for maintenance, and recheck the interruption window after recovery. Before deletion, confirm how the task and its progress will be handled.

This entry point is for continuous synchronization. Two reverse tasks do not thereby provide dual-active loop prevention, client failover, or conflict handling. Use the dedicated workflow in Disaster Recovery and Dual-Active Replication for dual-active deployment. Start with isolated test databases; do not establish bidirectional links between production databases for the first exercise.
2.3 GUI Sequence for Central Pull
For continuous subscription, have the source administrator prepare subscription objects and their DSN on the edge cluster. Then log in to central taosExplorer, open Data In → Create New Task, select TDengine Data Subscription and the central target database, and enter the source Topic DSN. Check connectivity, consumer group, and initial position before submission. See TMQ Continuous Synchronization for all fields and recovery limits. Do not replace the copied edge address with the central connection address.
For historical queries, create a TDengine Query task at the center. Enter the edge taosAdapter host, port, source database, and an account permitted to read the source, and select the central target database. Specify objects and a finite time range before submission. See TDengine Query Migration for fields and verification. Both task types execute at the center; browser location does not determine connection direction.
3. Data-Diode Components and Permissions
The link is: source TDengine → sending-side taosX incremental files → vendor file transfer → receiving directory → receiving-side taosX restoration → target TDengine.
The sending backup task and receiving restore task each connect to their own network's cluster. Complete files cross the diode. The diagram shows OT-to-IT data flow; configure actual deployment for the approved direction. Arrows do not imply that reverse acknowledgments or ordinary database connections are permitted.
Deployment personnel prepare a backup working directory and vendor send directory on the sending side and a separate receive directory on the receiving side. Directories must already exist, have enough space, and allow access only to relevant service accounts. Give each source separate working, send, and receive directories and a separate restore task. A separate target database is also recommended.
3.1 Verify Vendor File Transfer First
- Have the network administrator register the vendor transfer tool's service endpoints. Do not use TDengine database nodes directly as diode transfer endpoints.
- Configure a separate transfer rule from Site A's send directory to its receive directory. Expose only a temporary suffix before transfer completes, delivering the final filename only on completion. Never overwrite a same-named file with different content.
- With the restore task stopped, send a nonsensitive text test file according to the vendor manual. Compare received content, size, and SHA-256. Check send/receive logs and when the final filename appears.
- Have the network administrator confirm that there is no actual return channel. Text arrival does not prove hardware one-way isolation. Fix transfer failures first; do not bypass them by starting a database link.
- Deployment personnel record the retention or archival procedure for successfully sent files. Do not delete files whose receipt is unconfirmed without approval. Vendor “send successful” does not mean TDengine restoration succeeded.
The backup working and send directories must be on storage supporting same-filesystem renames so that complete files can be delivered. Across disks, volumes, or mount points, do not assume moves have the same atomicity. Reserve backlog space for the maximum failure window on both sides.
Use stable time synchronization on the sending side and avoid manually setting the system clock backward during operation. Backup points and filenames use generation time. Clock rollback can break the correspondence between filename time order and generation order. Sortable filenames are not a guarantee independent of clock synchronization. If clock rollback or a naming collision occurs, preserve the scene and check affected chains using the failure procedures below. Do not overwrite or rename files to bypass the issue.
3.2 Start the Two Processes Separately
The hosts, accounts, and databases below are placeholders. The examples are two independent processes on one chain, run separately on the actual sending and receiving hosts, not two sequential steps on one host. Deployment personnel must create and authorize directories in advance; the commands do not change permissions automatically.
Before the first run, choose a valid topic name dedicated to this chain. These examples fix it as site_a_diode on Linux, Windows, and in the multiple-Adapter variant below. use.topic.name fixes the sending topic; unless group.id is explicitly configured, the consumer group defaults to the same name. Without use.topic.name, the topic is generated from the source and target DSNs and startup time. Rerunning the same command may therefore create a new subscription identity instead of resuming the old chain. Use different names for other chains. For existing chains, follow Stop and Resume.
- Linux
- Windows
Bash on the sending Linux host:
taosx run -f 'tmq://<源用户>:<编码后的源密码>@<源主机>:6030/edge_db?use.topic.name=site_a_diode&upcoming=now&interval=1s&self.repeat=true' -t 'local:/data/taosx/site_a/backup?move.to=/data/diode/out/site_a' -v
Bash on the receiving Linux host:
taosx run -f 'local:/data/diode/in/site_a?checkpoint=true' -t 'taos://<目标用户>:<编码后的目标密码>@<目标主机>:6030/site_a_central' -v
PowerShell on the sending Windows host:
& 'C:\TDengine\taosx.exe' run -f 'tmq://<源用户>:<编码后的源密码>@<源主机>:6030/edge_db?use.topic.name=site_a_diode&upcoming=now&interval=1s&self.repeat=true' -t 'local:C:/taosx/site_a/backup?move.to=C:/diode/out/site_a' -v
PowerShell on the receiving Windows host:
& 'C:\TDengine\taosx.exe' run -f 'local:C:/diode/in/site_a?checkpoint=true' -t 'taos://<目标用户>:<编码后的目标密码>@<目标主机>:6030/site_a_central' -v
| Item | Meaning |
|---|---|
use.topic.name=site_a_diode | Fix this chain's sending topic; the consumer group has the same name unless group.id is specified. Reuse the original value and source subscription state across restarts, Adapter changes, and takeover. |
upcoming=now | Schedule the first backup immediately. It is not the source read starting position and does not mean read only post-startup data. Initial scope depends on subscription start, snapshot, and readable source range. Verify initial backup completeness. |
interval=1s | Incremental-file generation interval, not an end-to-end delay guarantee. |
self.repeat=true | Run the incremental task continuously. |
local: | A file directory on the host running the current process. |
checkpoint=true | Enable checkpoints for receiving-side local .z data files; off by default if omitted. File order and independent per-source chains are still required. |
move.to | The send directory where generated files are handed to the vendor transfer tool, not a remote target path. |
6030 | This example uses Native connections and requires matching client dependencies. WebSocket uses the corresponding DSN and taosAdapter port. |
The receiving taosx run uses finite retries for retryable errors. Target DSN error.max.retry (compatibility alias error_retry_max) defaults to 10, and retry_interval defaults to 5 seconds. For example, to explicitly retain both defaults, use receiving target taos://<目标用户>:<编码后的目标密码>@<目标主机>:6030/site_a_central?error.max.retry=10&retry_interval=5s. Both are target DSN options. Do not place them in the source local: directory or mix them with same-named or similar sending backup-schedule parameters.
Finite retries apply only to writes that can be safely retried. They cannot supply missing files, repair corrupted content, or correct authentication. When files are damaged or write outcomes cannot be confirmed, taosX retains originals and reports an error. Even with deletion or movement configured, taosX acts only on files confirmed completely restored. On failure, record the first failed file, error, and target range already written. Check the target and original backup before planning ordered retransmission or replay. Do not hide file-chain gaps by increasing retries.
This example stores checkpoints in local-restore-v1/ under the persistent taosX data directory. After interruption, retain original backups in the receive directory and this state directory. Correct the failure and rerun with the original input directory, restore range, target database, and same persistent taosX data directory to skip completed files and resume unfinished files from the last usable checkpoint. Also retain .taosx-restore-v1-* directories created during file handling. For the complete procedure and excluded backup types, see Enable checkpoint recovery.
Have the vendor confirm supported platforms, paths, and completion markers. taosX platform support does not establish vendor transfer verification. Each cluster can use taosAdapter within its own network. When switching to WebSocket, use tmq+ws for the sending source and taos+ws with the actual port for the receiving target. Do not use the Native database port directly for WebSocket.
4. Verify the Entire File Chain
-
Use isolated test source database
edge_dband targetsite_a_central. Have an authorized TDengine TSDB administrator confirm precision and WAL retention. The backup interval must be shorter than WAL retention with the agreed interruption margin. If the target is absent, create it with approved permissions. Do not use a business database for the first exercise. -
After the sending task is ready, create this test supertable and write two records in the source cluster's taosExplorer Data Browser or taos CLI. Choose new names if they exist. Here the source generates
NOWfor on-site transfer verification only; it is not the historical migration starting point.CREATE STABLE edge_db.diode_check (ts TIMESTAMP, value DOUBLE)
TAGS (site VARCHAR(32));
INSERT INTO edge_db.site_a_check USING edge_db.diode_check TAGS ('site_a')
VALUES (NOW - 1s, 10.5) (NOW, 11.5);
SELECT ts, value, site FROM edge_db.site_a_check ORDER BY ts;Save the two actual timestamps and values returned by the source. Query the same timestamps on the target. A continually growing whole-database count is not the same range.
-
Check newly generated incremental files and logs on the sending side. Confirm corresponding transfer completion in the vendor tool, not just file existence in the working directory.
-
On the receiving side, check arrivals by source and file sequence. Incomplete files must retain the vendor temporary marker and must not be restored as complete files.
-
Check restoration logs to confirm processing of the corresponding files. Query
site_a_central.site_a_checkin the target cluster's taosExplorer Data Browser or taos CLI and verify both source timestamps,10.5,11.5, and tagsite_a. -
Write another recognizable timestamp at the source. Check multiple incremental files continuously and confirm ongoing arrival, send/receive backlog, and target delay meet business requirements. Do not run hundred-million-row load commands for minimal verification.
4.1 Check Filenames and Delivery Order
In this solution, .z stores data and related changes, and .mz is a schema snapshot. Do not transfer only data files while omitting schema materials required by the chain. A typical filename is <topic>-<备份点毫秒时间>-<vgroup ID>-<序号>.z; schema snapshots use .mz. These fields distinguish backup objects, backup points, source groups, and file sequence numbers. Do not rename files manually. Restoration must follow source write-event order, independently of row timestamps; do not reorder files by business-record time.
The restoration process sorts currently visible files, but this does not prove it can detect predecessor files that have not arrived, nor does it automatically prevent every ordering error. The diode delivery process must control completeness and order. On a gap, hold subsequent files and pause the affected chain until it is filled. Keep temporary suffixes during transfer and rename to final names only on completion. Final .z files already present before startup must also be complete. Stable file size or modification time does not replace complete-file publication.
Use regular files as restore inputs. Network filesystems must support file identity checks, non-overwriting atomic moves, and directory synchronization. If waiting for .z.partial or .z.open.partial persists, first confirm the producer has stopped, the temporary file is abandoned, and the original backup can be republished. Then move the abandoned remnant out of the restore directory and supply the complete backup before resuming. Do not move files still being written.
Verify both directories and transfer results separately. For complete backup-chain, hidden-layout, and remote-replication requirements, see Data Backup and Recovery in the operations guide. Commands on the two sides run independently, share no task state, and do not form an automatically acknowledged transaction across the diode.
5. Troubleshooting
| Symptom | Next action |
|---|---|
| No files generated | On the sending side, check source subscription, WAL, license, working directory, and new source writes. |
| Files in working directory but none in send directory | Check move.to, permissions, space, and corresponding errors. |
| Send-directory backlog | Check vendor transfer status and network. Do not change TDengine subscription start to conceal backlog. |
| Received files but no target data | Check completeness, order, restore logs, and target database mapping. |
| Missing files or values revert from new to old | Pause subsequent restoration on the affected chain. Identify the first gap and whether old files replayed; follow the recovery plan. |
| Source clock rollback or same-named file conflict | Pause the affected chain and preserve the scene. Check time synchronization, file inventory, and backup points. Isolate abnormal copies for inspection without moving files being written. Do not overwrite same-named files or manually rename them and continue restoration. |
| Restoration repeatedly processes the same file or exhausts retries | Save the error and first failed file. Check target authentication, space, schema, and file integrity. Verify the written range before arranging ordered retransmission or replay; do not resubmit all old files. |
6. Stop and Resume
Before maintenance, record process arguments on both sides, current chain position, directory backlog, and free space. Sending-side restart or takeover must reuse the original use.topic.name, consumer group, and source subscription offsets, preserving the original topic, working directory, and undelivered files. This example omits group.id, which defaults to the topic name; retain any explicitly configured value in an existing chain. If the old chain did not fix its topic on the first run, identify the actual topic and consumer group from source subscription records, original logs, and backup files before setting use.topic.name to that original topic. Do not switch to the example name or a new name and claim to inherit progress. If the original topic, consumer group, offsets, or required WAL are lost, pause and assess the gap, then initialize and verify a new chain.
On the receiving side, retain the same chain, original backups, and checkpoint state when stopping and resuming, using the directory, range, and target settings above. With checkpoints disabled, rerunning starts from the beginning of files still in the restore range. Do not resubmit all historical files to the active receive directory. Replay may write again, and replaying older files after newer ones may overwrite rows with the same primary key. Table name and timestamp alone do not establish duplicate-free replay.
This solution does not provide unified cross-host automatic takeover for backup, transfer, and restore processes. Design redundancy separately for the following four layers, assigning maintenance personnel, switchover conditions, and verification records to each. Xnode task takeover does not replace vendor endpoint and file-chain safeguards.
6.1 Database and Client Connection Layer
Configure high availability independently within each cluster's own network. Database nodes are not vendor diode file-transfer endpoints. Each taosX can connect through multiple local-network taosAdapter addresses or an approved local load balancer/VIP. Only files still cross the diode.
For WebSocket, use tmq+ws for the sending subscription source and taos+ws for the receiving database target. Separate multiple taosAdapters with ASCII commas and specify every port. For example, configure the sending source as:
tmq+ws://<源用户>:<编码后的源密码>@<源Adapter1>:6041,<源Adapter2>:6041/edge_db?use.topic.name=site_a_diode&upcoming=now&interval=1s&self.repeat=true
The corresponding receiving target is:
taos+ws://<目标用户>:<编码后的目标密码>@<目标Adapter1>:6041,<目标Adapter2>:6041/site_a_central
Each address group must point to one local cluster with consistent identity, permissions, TLS, databases, and subscription objects. Address lists do not promise access in strict listed order or uninterrupted failover for every failure. With TLS, use the corresponding secure protocol and verify certificates. VIPs and load balancers must support long-lived WebSocket connections and actual health checks, not just TCP-port checks.
Verify each address reaches the same objects first. Then, in isolation, interrupt only one dedicated client connection or dedicated Adapter and observe reconnection, file generation, and target values. Do not stop an Adapter serving other tasks for the first exercise. Check sending subscription progress, source WAL retention, uncommitted data, and generated files separately. Database replicas do not establish that all file-chain progress is preserved.
6.2 Backup and Restore Process Layer
Configure controlled monitoring, restart, and manual takeover procedures for both processes. Standby processes retain original task arguments, identities, state directories, and chain identifiers. Before takeover, confirm the original process is stopped or isolated so that two instances do not write one working directory or replay one receive directory simultaneously. Placing the executable on another machine does not give it the original task's state.
For cross-host takeover, identify which state is in the database, which is local, how to obtain a consistent copy, and who owns directory write access. Shared storage must meet actual file-locking, rename, failure-isolation, and permission requirements. An ordinary shared directory does not automatically provide primary/standby arbitration. After switchover, check the last verified backup point before interruption, unprocessed files, and target data before resuming continuous processing.
6.3 Vendor File-Transfer Endpoint Layer
When redundancy is required, have vendor or network personnel configure sending/receiving VIPs, floating IPs, or supporting primary/standby mechanisms. The diode continues to use an approved single service endpoint. After endpoint switchover, separately check directory mappings, service identities, temporary-file rules, and backlog continuity. VIP connectivity alone does not replace file verification. Verify this mechanism separately from database or Adapter connection redundancy on either side.
6.4 File Chain and Storage Layer
Working, send, receive, and preservation directories must cover the maximum failure backlog. The file inventory records source, backup point, name, size, and SHA-256. During takeover, maintain complete final-file delivery and predecessor order. Do not expose still-written temporary files to restoration. Before retransmission, compare same-named content. Do not overwrite different content or resubmit every historical copy to the active directory.
Using this page's file-chain verification procedure, check a known record before switchover, during it, and after recovery. Compare objects, primary keys, values, tags, and change order, and check skipped errors and exhausted retries. Actual recovery time depends on drills for this deployment. No uniform fixed switchover time or unconditional loss-free, duplicate-free operation is promised.
7. Limitations
Cross-diode restoration of external files uses taosx run. Do not assume taosExplorer provides the same file-import restoration entry point. This page describes only the link. See Backup and Restore for a complete backup strategy. Incremental files alone do not establish whole-database recoverability or a completed disaster-recovery drill.