Cassandra不从数据文件夹加载提交日志。

huangapple go评论69阅读模式
英文:

Cassandra does not load commitlog from the data folder

问题

我是新手使用Cassandra,但我想恢复Cassandra备份。

在恢复Cassandra时,不会加载尚未提交到内存表并可在Commitlog中使用的数据。据我所知,它根据基准测试来提交数据到数据库,但在恢复过程中应加载所有日志和数据。

请帮助。

我将所有Cassandra数据文件复制到我的新Cassandra安装文件夹中,并尝试还原备份。

在此之前,我已经创建了新的Cassandra服务器,在新服务器上创建了Keyspace和表。

然后,我将所有数据文件复制到相应的表文件夹中。

然后重新启动了Cassandra,并运行了Cassandra nodetool refresh命令。

英文:

I am new to cassandra, but i want to resotore cassandra back up.

While restoring cassandra does not load data which is not yet commited to mem table and available in the Commitlog. as i know it has benchmark based on that it will commit the data in data base but while restoration it shoul load all the logs and data.

please help

i copy all the cassandra data files in to my new cassandra installation folder. and try to restore restore the backup.

befor that i have create new cassandra server, created Keyspace and tables on new server.

then i copyied all data files in the respected tables folder.

then restarted the cassandra. and run cassandra nodetool refresh commmand.

答案1

得分: 1

你不能只是将提交日志从一个节点复制到另一个节点,即使它在同一台服务器上进行了新安装,因为从技术上讲,它是不同的节点(在新安装上分配了新的主机ID)。

在Cassandra中,你不能简单地将文件从一个节点复制到另一个节点以恢复数据。你需要对数据进行快照,这相当于传统RDBMS中的冷备份,但不需要停机。

如果你感兴趣,我已经在https://dba.stackexchange.com/questions/316520/中解释了该过程。

由于你是Cassandra的新手,我建议观看关于Cassandra备份基础和快照工作原理的简短视频。如果你想了解更多关于Cassandra的信息,我们在DataStax Academy上提供了几门免费课程。干杯!

英文:

You cannot just copy the commit logs from one node to another, even if it is on the same server with a fresh installation because it is technically a different node (a new host ID is allocated on new installations).

In Cassandra, you cannot simply copy files from one node to another to restore the data. You need to take a snapshot of the data which is the equivalent of a cold backup in traditional RDBMS but doesn't require downtime.

If you're interested, I've explained the procedure in https://dba.stackexchange.com/questions/316520/.

Since you're new to Cassandra, I would recommend watching this short video on the basics of Cassandra backups and how snapshots work. If you want to learn more about Cassandra, we have several courses at DataStax Academy and they're all FREE. Cheers!

huangapple
  • 本文由 发表于 2023年7月17日 13:38:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76701733.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定