[ 
https://issues.apache.org/jira/browse/SOLR-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275476#comment-15275476
 ] 

Varun Thacker commented on SOLR-5750:
-------------------------------------

Some docs on the feature . Any thoughts on this otherwise I'll add it over to 
the ref guide

SolrCloud Backup and Restore of Collections

Backup and Restore Solr collections and it's associated configurations to a 
shared filesystem - for example HDFS or a Network File System

Backup command:

/admin/collections?action=BACKUP&name=myBackupName&collection=myCollectionName&location=/path/to/my/shared/drive

The backup command will backup Solr indexes and configurations for a specified 
collection.
The backup command takes one copy from each shard for the indexes. For 
configurations it backs up the configSet that was associated with the 
collection and other meta information.

key/Type/Required/Default/Description

name/string/yes/<empty>/The backup name
collection/string/yes/<empty>/The name of the collection that needs to be 
backed up
location/string/no/The location on the shared drive for the backup command to 
write to. Alternately it can be set as a cluster property (hyperlink to 
CLUSTERPROP and document it as a supported property)
async ( copy over from existing docs)

Restore command:

/admin/collections?action=RESTORE&name=myBackupName&location=/path/to/my/sharded/drive&collection=myRestoredCollectionName

Restores Solr indexes and associated configurations.
The restore operation will create a collection with the specified name from the 
collection parameter. You cannot restore into the same collection and the 
collection should not be present at the time of restoring the collection, Solr 
will create it for you. The collection created will be of the same number of 
shards and replicas as the original colleciton, preserving routing information 
etc. Optionally you can overide some parameters documented below. For restoring 
the associated configSet if a configSet with the same name exists in ZK then 
Solr will reuse that else it will upload the backed up configSet in ZooKeeper 
and use that for the restored collection.

You can use the Collection ALIAS (hyperlink) feature to make sure client's 
don't need to change the endpoint to query or index against the restored 
collection.

key/Type/Required/Default/Description

name/string/yes/<empty>/The backup name that needs to be restored
collection/string/yes/<empty>/The collection where the indexes will be restored 
to.
location/string/no/The location on the shared drive for the restore command to 
read from. Alternately it can be set as a cluster property (hyperlink to 
CLUSTERPROP and document it as a supported property)

(copy over from existing docs)
async
collection.configName
replicationFactor
maxShardsPerNode
autoAddReplicas
property.Param
stateFormat

> Backup/Restore API for SolrCloud
> --------------------------------
>
>                 Key: SOLR-5750
>                 URL: https://issues.apache.org/jira/browse/SOLR-5750
>             Project: Solr
>          Issue Type: Sub-task
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Varun Thacker
>             Fix For: 6.1
>
>         Attachments: SOLR-5750.patch, SOLR-5750.patch, SOLR-5750.patch, 
> SOLR-5750.patch, SOLR-5750.patch, SOLR-5750.patch, SOLR-5750.patch
>
>
> We should have an easy way to do backups and restores in SolrCloud. The 
> ReplicationHandler supports a backup command which can create snapshots of 
> the index but that is too little.
> The command should be able to backup:
> # Snapshots of all indexes or indexes from the leader or the shards
> # Config set
> # Cluster state
> # Cluster properties
> # Aliases
> # Overseer work queue?
> A restore should be able to completely restore the cloud i.e. no manual steps 
> required other than bringing nodes back up or setting up a new cloud cluster.
> SOLR-5340 will be a part of this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to