[
https://issues.apache.org/jira/browse/CASSANDRA-4235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281449#comment-13281449
]
Pantelis Sopasakis commented on CASSANDRA-4235:
-----------------------------------------------
Thanks to the people in #cassandra on IRC I managed to find out how to recover
from such an incident. Here's the procedure:
0. Before it is too late export your KS schema: Create a file called
'schema_export' and add the following lines inside:
use MyKeyspace;
show schema;
then run this cassandra script and save the output in another file:
cassandra-cli < schema_export > my.schema
keep this file under lock and key! If you change your schema, remember to
update the file. Edit the file and remove non-command lines like "Connected to:
"Test Cluster" on 127.0.0.1/9160".
1. Stop the server
1. Delete 'system': rm -r /var/lib/cassandra/data/system
2. Start the server
3. Load the schema: cassandra-cli < my.schema
4. Restart the server and connect using the client. Apply a 'use MyKeyspace'
and you'll see that your keyspace is there. Also your data is there.
I hope this helps.
> keyspaces missing after restart
> -------------------------------
>
> Key: CASSANDRA-4235
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4235
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.0
> Environment: ubuntu
> Reporter: David Hawthorne
> Assignee: Pavel Yaskevich
> Priority: Critical
> Attachments: cassandra.log, cassandra2.log
>
>
> After restarting cassandra, the only keyspace that exists is the system
> keyspace. All data files are still there for other keyspaces, though.
> The issue was also described here:
> http://www.mail-archive.com/[email protected]/msg22231.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira