sk1007
sk1007

Reputation: 571

how to create solr index backup and restore?

we are creating the snapshot of all keyspaces of Cassandra. but also need the create a backup of solr index contains huge data, which is useful in Solr indexing. Here is datastax link to create backup.

I tried we the following command

$nodetool -h localhost rebuild_index ks cf ks.cf

which is working fine for small data and takes more time for the huge size of data.

"Backup Solr Indexes" section in datastax doc. and try to run:

 $backup -d /var/lib/cassandra/data/solr.data -u root -v

and found this: backup: Unrecognized or ambiguous switch '-d'; type 'backup help interactive' for detailed help.

means this backup package is not for the solr index. where we can find out suitable backup package?

Could someone suggest me how to create the backup and restore for solr index?

Upvotes: 0

Views: 661

Answers (1)

Caleb Rackliffe
Caleb Rackliffe

Reputation: 575

Assuming you'll be creating backups intended to restore a cluster with the same token layout, and you can make your backups in a rolling fashion, something like the following may at least be a starting point:

For each node...

1.) nodetool drain the node to make sure your Solr cores are in sync with their backing Cassandra tables. (drain forces a memtable flush, which forces a Solr hard commit.)

2.) Shut down the node.

3.) Manually back up your data directories (.../solr.data for your index).

4.) Start the node again.

Upvotes: 1

Related Questions