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

前端 未结 2 1099
青春惊慌失措
青春惊慌失措 2021-01-16 15:39

I\'ve searched for previous versions of this question, but none seem to fit my case. I have an existing Cassandra cluster running 2.0.x. I\'ve been allocated new VMs, so I d

相关标签:
2条回答
  • 2021-01-16 16:06

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

    0 讨论(0)
  • 2021-01-16 16:20

    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.

    0 讨论(0)
提交回复
热议问题