You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Allan Mascarenhas <al...@gmail.com> on 2014/01/24 07:47:15 UTC

Re: solrcloud shards backup/restoration

Any update on this ? 

I am also stuck with same problem, I want to install snapshot of master solr
server to my local environment. but i could't  :(

All most spend 2 days to figure it out the way. Please help!!



--
View this message in context: http://lucene.472066.n3.nabble.com/solrcloud-shards-backup-restoration-tp4088447p4113142.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solrcloud shards backup/restoration

Posted by Greg Walters <gr...@answers.com>.
We've managed some success restoring existing/backed up indexes into solr cloud and even building the indexes offline and dumping the lucene files into the directories that solr expects. The general steps we follow are:

1) Round up your files. It doesn't matter if you pull from a master or slave so long as you've committed and get a consistent copy of the data. 

2) Use the collection api to create a collection in solr. The collection you're creating must have the same number of shards as the collection you've backed up and are restoring.

3) Stop all solr nodes. 

4) Remove the <index_name>/data/ directory from the shards you're going to make the leader. In our case we've got 6 shards and a replication factor of 3 on a 6 node cluster so each server/jvm has three shards on it. Conveniently the shards are all either even or odd per jvm.

5) Populate the <index_name>/data/ directories on your intended leaders. As mentioned above since we've got six shards and any two jvm contain the entire index we only populate the data on two servers.

6) Start up *JUST* the servers that you've just populated. The goal here is to make these servers you've populated the leaders for the new collection and to have the official "full copy" of the index. Upon startup you might have to wait $leaderVoteWait for previously non-leader servers to timeout and become leaders

7) Once you've got at least one core up in each shard of your collection go ahead and start the others up.

I think Aditya was failing by removing all the zookeeper data and starting everything up at once. If you force solr's hand a bit to pick leaders with the data that you want you'll have success when it replicates out to other nodes. It might also be possible to do this on-line by not stopping solr after creating the empty collection then copying the files into place on the leaders and issuing a RELOAD to pick up the changed indexes. I'm not sure how replicas would handle that though.

Thanks,
Greg


On Jan 24, 2014, at 12:47 AM, Allan Mascarenhas <al...@gmail.com> wrote:

> Any update on this ? 
> 
> I am also stuck with same problem, I want to install snapshot of master solr
> server to my local environment. but i could't  :(
> 
> All most spend 2 days to figure it out the way. Please help!!
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solrcloud-shards-backup-restoration-tp4088447p4113142.html
> Sent from the Solr - User mailing list archive at Nabble.com.