Cassandra upgrade from 2.0.x to 2.1.x or 3.0.x

风流意气都作罢 提交于 2019-12-01 12:18:15

Yes, it is possible to migrate data to a different environment (the new vm's with the updated Cassandra using sstableloader, but you will need C* 3.0.5 and above, as that version added support to upload sstables from previous versions.

Once that the process is completed it is recommended to execute nodetool upgradesstables to ensure that there are no incompatibilities on the data, and a nodetool cleanup.

Regarding your comment ... it implies that any upgrade requiring SSTable upgrades would require all nodes to be taken offline simultaneously;... is not true; doing the upgrade one node at a time will create a mixed cluster with nodes with the two versions as you mentioned, which is not optimal, but will allow you to avoid any downtime in production. (Note that the impact of this operation will depend on the consistency level used in your application.)

Don't worry about the migration. You can simply migrate your Cassandra 2.0.X cluster to Cassandra 3.0.X. But its better if you migrate your cluster Cassandra 2.0.X to latest Cassandra 2.X.X then Cassandra 3.0.X. You need to follow some steps-

  1. Backup data
  2. Uninstall present version
  3. Install the version you want to upgrade
  4. Restore data

As you are doing migration, you need to be careful about your data always. For the data backup and restore you can follow two ways-

  1. Creating snapshots of your sstables and then after installing the new version of cassandra, placing the files to the data location and run sstableloader.
  2. Backup your schema's to a .cql file and copy all the tables to .csv and then after installing the new version of cassandra, source your schema from .cql and copy all the tables from every single .csv file.

If you are fully convinced how you will complete the migration then you can write a bash script to complete the backup and restore steps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!