Omid
Omid

Reputation: 51

How to backup solrcloud?

I use SolrCloud 6.0.0 and I want backup from my collection using this command:

curl http://localhost:8983/solr/myCollection1/replication?command=backup

But after run, backup taken from only some shards of collection!!! how can i take a full backup from all shards in a collection ?

If someone can help me with this it would be great.

Upvotes: 1

Views: 2452

Answers (2)

AR1
AR1

Reputation: 5013

• You need to create the backup for every shard in the collection, so the mentioned command should be sent to every shard leader after issuing a hard commit.

• the actual backup process runs in the background, so the backup request will return immediately. Consequently, you need a mechanism to determine when the actual backup is complete, as it can take several minutes to back up a large index.

• The command must be run on each node and will create backup for the local node and this is something else to check as it could be your problem.

The first 2 bullets are extracted by "solr in action" Book.

Please consider reading chapter 13.6.6 of Solr in Action book, that provides also a working example of a backup utility.

Upvotes: 0

MatsLindh
MatsLindh

Reputation: 52882

Use the Collections API for backing up the complete collection (all shards and collection configuration).

If you're using the /replication endpoint manually, you'll have to handle the cluster structure and state yourself, which is the reason why the collection API endpoint was created - to do exactly that for you automagically.

Upvotes: 4

Related Questions