PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

manoj.sharma99765_192577 avatar image
manoj.sharma99765_192577 asked ·

Is it possible to clone a table which has Solr indexes to another cluster without indexing again?

There are 2 cluster of Cassandra Test1 & Test2(both has same version & config). Need to backup keyspace present on solr enable node of test1 cluster and restore same to solr enable node of Test2 cluster. Post restoring keyspace we need to create core & perform indexing again is there any way to avoid re indexing post restoration please let us know what files should we copy from test1 cluster to test2 cluster to achieve same.

[EDIT] I have tried following

1) Created keyspace ks1 on test2 cluster on node using schema of ks on test1 node 2 then Copied keyspace data from test1 cluster node 2 datafolder: /var/lib/cassandra/data/ks1/*

2) also copied solr.data/ks1.table/index to test 2 node

3)restarted service post this activity

4) ks working fine able to query data

5) but cores are not there in solr which were created for ks on node 1(test1) checked logs there was error unable to initialize core as resources schema.xml & are not present did you missed to upload it ? Please let me know from which folder i can copy this resources from node(test1)) and keep in test2 so that i can avoid skip core creation and reindexing again on test2 cluster for ks keyspace.

I havent used sstableloder copied data directly using scp and saved in destination ks data directory .

Dse Version : 5.0.7

Alao let me know if it is must to perform reindexing post restoring backup of dse search node on another search node.

dsesearchrestore
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi @manoj.sharma99765_192577,

you write that both clusters have the same version and configuration.

If you want to clone a keyspace by copying the snapshot files, you will also need to have the exact same token layout as the original cluster. If both clusters are already set up, it is unlikely that this is the case.

However, if you have the exact same token layout, you can copy both the sstables and the solr data. You will find the solr data relevant to your keyspace in your solr.data directory, organized by <keyspace>.<table> name. The default location for the solr.data is /var/lib/cassandra/data/solr.data

For the solr data backup steps, see here.


If the tokens are different, you can load your sstables with sstableloader, but then you will need to reindex the data to get the matching solr index per node.

I am not sure what version you are on, but here is some documentation for Cassandra 3.x:

https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/operations/opsBackupSnapshotRestore.html

This one has the information about how to retrieve the list of tokens and how to set them up in the new cluster:

https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/operations/opsSnapshotRestoreNewCluster.html

I hope this answers your question, let us know.


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered ·

It isn't possible to restore the Solr indexes in the way that you're proposing. You must create the Solr core on the new cluster. If you create the Solr core after you've re-created the CQL table but before you clone the keyspace, DSE Search will automatically index the data you loaded.

It is not possible to restore the indexes from another node or another cluster. If you think about it, the SSTable files on disk will not be identical between the source node(s) and new node(s) so indexes from the source don't contain valid data when copied to the new node(s). Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.