cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pantelis Sopasakis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-4235) keyspaces missing after restart
Date Wed, 23 May 2012 08:11:41 GMT


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".

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:
>             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:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message