1

Datastax文档指出

只有当表模式存在时,Cassandra 才能从快照中恢复数据。如果您还没有备份架构,[...]

架构的完整备份需要什么?只是备份system密钥空间?

4

2 回答 2

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.
于 2015-11-25T14:58:06.790 回答
2

无需备份系统密钥空间,它们将在新节点上安装 DSE 时重新创建。但是,您需要任何用户定义的键空间的架构。

要备份架构:

$ cqlsh -e "DESCRIBE SCHEMA;" > schema.out

要在新节点上恢复:

$ cqlsh < schema.out
于 2015-11-25T15:25:20.367 回答