EXPORT STORAGE NODES
Description
The EXPORT STORAGE NODES syntax is used to export storage node configurations in JSON format.
Syntax
ExportStorageNodes ::=
'EXPORT' 'STORAGE' 'NODES' ('FROM' databaseName)? ('TO' 'FILE' filePath)?
databaseName ::=
identifier
filePath ::=
stringReturn Value Description
| 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) |
Supplement
- When
databaseNameis not specified, storage nodes of all logical databases are exported; - When
databaseNameis specified, only storage nodes of the specified logical database are exported; - If the specified
databaseNamedoes not exist, export will fail; - When
filePathis specified, the result is written to file and existing file content will be overwritten; - Exported JSON contains connection information such as
usernameandpassword; protect the output properly.
Example
EXPORT STORAGE NODES;EXPORT STORAGE NODES FROM sharding_db TO FILE '/tmp/storage-nodes.json';Reserved word
EXPORT, STORAGE, NODES, FROM, TO, FILE