Hosein Masbough
Hosein Masbough

Reputation: 441

Cassandra restore database to a newer version

I get backup from keyspace of the cassandra 1.2.4.When i restore the snapshot in version 2.0.5 of cassandra , I can't start service of cassandra.

I get this error:

could not access pidfile for Cassandra

When repair permissions of the directories of cassandra and again start the cassandra, it is not running.

In system.log file there is exception:

ERROR [SSTableBatchOpen:1] 2014-04-15 12:25:45,797 SSTableReader.java (line 268) Corrupt sstable /var/lib/cassandra/data/keyspace/users667409781968744488$ java.io.EOFException

what is the problem? and how can i resolve this?

is it because of restoring Cassandra snapshots from 1.2.4 to 2.0.5?

Upvotes: 0

Views: 644

Answers (2)

DmitryKanunnikoff
DmitryKanunnikoff

Reputation: 2266

UPDATE

  1. Download the versions 1.2.13 and 2.0.5 of Cassandra from the official site . Unpack . Configure cassandra.yaml in both versions downloaded Cassandra. Take as a basis the existing (old) version cassandra.yaml.
  2. Make snapshot for old Cassandra: nodetool snapshot.
  3. Stop recording unit (reading will continue to work): nodetool drain.
  4. Stop old Cassandra.
  5. Copy the data from the current (old) Cassandra in a new version 1.2.13. Run it (1.2.13).
  6. Perform for Cassandra 1.2.13 update command table format: nodetool upgradesstables-a.
  7. Copy data from Cassandra 1.2.13 to Cassandra 2.0.5.  

FINE POINTS

  1. In 2.0.5 are included by default virtual hosts - vnodes (record "num_tokens: 256" in cassandra.yaml).
  2. In 2.0.5 record "index_interval: 128" factored out of the file cassandra.yaml to the level properties of the table.
  3. In 2.0.5 some settings from previous versions of cassandra.yaml are absent.

Upvotes: 0

Ananth
Ananth

Reputation: 991

You cannot directly upgrade from 1.2.4 to 2.0.5. You have to do a rolling upgrade.You gotto upgrade first to 1.2.15 and then do an upgrade to 2.0.5.

http://www.datastax.com/documentation/upgrade/doc/upgrade/cassandra/upgradeC_c.html

Upvotes: 1

Related Questions