简体   繁体   中英

Restore data in Cassandra 3.9. from snapshot taken in Cassandra 2.1.15

Did someone know, how to restore data in Cassandra 3.9. from snapshot taken in Cassandra 2.1.15 (before I upgraded Cassandra)?

Just copying snapshot files into proper data directory and executing "nodetool refresh" didn't work.

Cassandra use sstables to save data into files. These sstables have a version.

Cassandra 2.1.15 supports sstable versions : ja (2.0.0), jb (2.0.1), ka (2.1.0):

Cassandra 3.9 supports sstable versions : jb (2.0.1), ka (2.1.0), la (2.2.0), lb (2.2.7), ma (3.0.0), mb (3.0.7, 3.7), mc (3.0.8, 3.9)

When upgrading cassandra , you must use 'nodetool upgradesstable' to upgrade sstable format version to latest available before and after upgrading cassandra.

I think your sstables are in version ja (2.0.0) that is not supported by cassandra 3.9.

Try to run nodetool upgradesstables.

Otherwise you can downgrade your 3.9 cluster to the version that supports your version sstbales version and upgrade it back afterwards.

And most secure option - create a side 2.1 cluster with 2.1 snapshots, and upgrade it until you get a needed version of sstables, take snapshot, restore to your 3.9 cluster.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM