The EXPORT STORAGE NODES syntax is used to export storage node configurations in JSON format.
ExportStorageNodes ::=
'EXPORT' 'STORAGE' 'NODES' ('FROM' databaseName)? ('TO' 'FILE' filePath)?
databaseName ::=
identifier
filePath ::=
string
| Columns | Description |
|---|---|
| id | current compute node id |
| create_time | export time |
| storage_nodes | exported storage node JSON (or success message when TO FILE is set) |
databaseName is not specified, storage nodes of all logical databases are exported;databaseName is specified, only storage nodes of the specified logical database are exported;databaseName does not exist, export will fail;filePath is specified, the result is written to file and existing file content will be overwritten;username and password; protect the output properly.EXPORT STORAGE NODES;
EXPORT STORAGE NODES FROM sharding_db TO FILE '/tmp/storage-nodes.json';
EXPORT, STORAGE, NODES, FROM, TO, FILE
