docs/en/06-advanced/04-edge.md
TDengine TSDB supports multiple methods for automated synchronization between edge and cloud nodes.
Before enabling edge–cloud synchronization, determine which method is appropriate for your environment.
The edge node pushes data from the specified database to the specified cloud node. You can repeat this procedure to synchronize additional databases or to synchronize data to multiple cloud nodes.
On the cloud node, create a database to which edge data will be replicated.
On the edge node, open a terminal.
Run the following command to push data to the cloud node:
taosx run -f 'taos://<edge-user>:<edge-password>@<edge-ip>:<edge-port>/<edge-db>' -t 'taos://<cloud-user>:<cloud-password>@<cloud-ip>:<cloud-port>/<cloud-db>' -v
For example, the following command synchronizes data from database sync_test on an edge node deployed at 192.0.2.1:6030 to database edge_data on a cloud node deployed at 198.51.100.1:6030, using the default username and password.
taosx run -f 'taos://root:[email protected]:6030/sync_test' -t 'taos://root:[email protected]:6030/edge_data' -v
For more information, see Migrating Data from Older Versions.
The cloud node subscribes to the specified database on the edge node and synchronizes its data to the specified database on the cloud node. You can repeat this procedure to create additional tasks to synchronize data from more databases or more cloud nodes.
For more information about TDengine Data Subscription tasks, see TDengine Data Subscription.
The cloud node queries the specified database on the edge node and synchronizes its data to the specified database on the cloud node. You can repeat this procedure to create additional tasks to synchronize data from more databases or more cloud nodes.
For more information about TDengine Query tasks, see TDengine Query.