EFS and SOLR Cloud Backup(2)Snapshot and Restore SOLR

EFS and SOLR Cloud Backup(2)Snapshot and Restore SOLR

We have about 100G data, we tested with about 47G data. The steps we did is as follow:
#1 backup the collection allJobs from allJobsTest cluster to EFS directory with name allJobsBackup
#2 restore on new cluster allJobsTest2 with a different collection name allJobs2 (why allJobs2, because we use script to create the cluster, there is already a collection named allJobs after creation)
#3 Add replica to the new cluster multiple times to enable all nodes to have the replica
#4 delete old collection in the new cluster allJobsTest2
#5 on the new cluster, make an alias from the new collection allJobs2 to old collection name allJobs

After that, we found that between steps #2, we can delete the old collection first, then we can directly restore the backup to the original collection name, so we do not need alias #5 step.

Here are some related commands.

SOLR Cluster Operation
Backup Cluster
name - backup file name
collection - original collection name
location - network share disk space which can be seen by all the nodes
async - one manual input ID which can retrieve the status later
http://alljobstest.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=BACKUP&name=allJobsBackup&collection=allJobs&location=/efs&async=123

Status Check
requestid - the manual input ID when we do something async, we can get the status back for that action
http://alljobstest.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=REQUESTSTATUS&requestid=123

Restore Cluster
name - backup cluster name
collection - collection name we restore back
location - efs location
async - manual input ID
http://alljobstest2.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=RESTORE&name=allJobsBackup&collection=allJobs&location=/efs&async=234

Add Replica to the Cloud
http://alljobstest2.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=ADDREPLICA&collection=allJobs&shard=shard1

Create Alias
http://alljobstest2.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=CREATEALIAS&name=allJobs&collections=allJobsBackup

Delete Alias
http://alljobstest2.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=DELETEALIAS&name=allJobs

Delete Collection
http://alljobstest2.us-east-1.elasticbeanstalk.com/solr/admin/collections?action=DELETE&name=allJobs

References:
http://sillycat.iteye.com/blog/2407536


猜你喜欢

转载自sillycat.iteye.com/blog/2407537