简体   繁体   English

Cassandra备份还原

[英]Cassandra backup restore

I am restoring Cassandra[3.10] backup using the snapshots. 我正在使用快照还原Cassandra [3.10]备份。 I have taken the backup of all the keyspaces, but there are additional keyspaces in Cassandra like system_distributed,system_auth,system_schema, system. 我已经备份了所有键空间,但是在Cassandra中还有其他键空间,例如system_distributed,system_auth,system_schema,system。 My question is while restoring do we also need this to be restored? 我的问题是还原时,我们还需要还原吗?

Below is the link that I followed http://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_backup_snapshot_restore_t.html#ops_backup_snapshot_restore_t 以下是我关注的链接http://docs.datastax.com/zh-CN/cassandra/2.1/cassandra/operations/ops_backup_snapshot_restore_t.html#ops_backup_snapshot_restore_t

You should NOT restore system keyspaces, except for the system_auth keyspace (you need this for the logins to work). 你不应该恢复系统keyspaces,除了system_auth密钥空间(你需要这样的登录工作)。 You can run into issues by doing so. 这样做可能会遇到问题。 I supported recently a production system which had that type of problems because they backed up and restored the system keyspaces. 我最近为一个存在此类问题的生产系统提供了支持,因为他们备份并还原了系统键空间。 I can't remember what the issue was, but I remember it had to do with the restore of these tables that kept values which should not be "recycled." 我不记得是什么问题,但是我记得它与恢复保留了不应“回收”的值的表有关。

Cassandra will create the system keyspaces on startup if they don't exist already. Cassandra将在启动时创建系统键空间(如果尚不存在)。

Equally important is to backup a schema version. 同样重要的是备份架构版本。 You will need the schema corresponding to the backup that you are restoring. 您将需要与要还原的备份相对应的架构。 Otherwise, if your schema changed since your last backup, the restore will not go well. 否则,如果自上次备份以来架构发生更改,则还原将无法顺利进行。

You can choose not to restore system keyspaces. 您可以选择不还原系统键空间。 Cassandra stores its state in System keyspace tables, basically it contain details about your database objects and cluster configuration. Cassandra将其状态存储在系统键空间表中,基本上它包含有关数据库对象和集群配置的详细信息。 Refer to this link system keyspace information . 请参阅此链接系统键空间信息 Those information will be created when you would do a backup. 这些信息将在您进行备份时创建。 For example: 例如:

select * from system_schema.tables;

You would see a bunch of information like gc_grace_seconds , memtable_flush_period_in_ms etc. 您会看到大量信息,例如gc_grace_secondsmemtable_flush_period_in_ms等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM