答案 0 :(得分:2)
在cqlsh(包含在Cassandra中)中,使用DESC SCHEMA
命令。
DESCRIBE [FULL] SCHEMA
Output CQL commands that could be used to recreate the entire (non-system) schema.
Works as though "DESCRIBE KEYSPACE k" was invoked for each non-system keyspace
k. Use DESCRIBE FULL SCHEMA to include the system keyspaces.
答案 1 :(得分:2)
无需备份系统密钥空间,在新节点上安装DSE时将重新创建它们。但是,您需要任何用户定义的键空间的架构。
备份架构:
$ cqlsh -e "DESCRIBE SCHEMA;" > schema.out
要在新节点上恢复:
$ cqlsh < schema.out