【发布时间】:2016-02-28 00:32:56
【问题描述】:
【问题讨论】:
标签: cassandra cassandra-2.0 datastax-enterprise cassandra-2.1
【问题讨论】:
标签: cassandra cassandra-2.0 datastax-enterprise cassandra-2.1
在 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.
【讨论】:
无需备份系统密钥空间,在新节点上安装 DSE 时会重新创建它们。但是,您需要任何用户定义的键空间的架构。
要备份架构:
$ cqlsh -e "DESCRIBE SCHEMA;" > schema.out
在新节点上恢复:
$ cqlsh < schema.out
【讨论】: