Cassandra-意外删除后恢复数据 [英] Cassandra - recovery of data after accidental delete

查看:434
本文介绍了Cassandra-意外删除后恢复数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于在压缩过程中物理删除了Cassandra的数据,是否可以通过任何方式访问最近删除的数据?我正在寻找类似于Oracle Flashback功能(的时间戳)。

As the data in case of Cassandra is physically removed during compaction, is it possible to access the recently deleted data in any way? I'm looking for something similar to Oracle Flashback feature (AS OF TIMESTAMP).

此外,我可以看到相关提交日志文件中的已删除数据片段,但是显然不可读。可以将此文件转换为更具可读性的格式吗?

Also, I can see the pieces of deleted data in the relevant commit log file, however it's obviously unreadable. Is it possible to convert this file to a more readable format?

推荐答案

您将要从提交日志中执行还原。
最安全的方法是将提交日志复制到具有相同架构的新集群,并按照 commitlog_archiving.properties 文件中的说明(注释)进行还原。对于您而言,您需要将 restore_point_in_time 设置为插入和删除之间的时间。

You will want to execute a restore from your commitlog. The safest is to copy the commitlog to a new cluster (with same schema), and restore following the instructions (comments) from commitlog_archiving.properties file. In your case, you will want to set restore_point_in_time to a time between your insert and your delete.

这篇关于Cassandra-意外删除后恢复数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆