[
https://issues.apache.org/jira/browse/SOLR-9688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15638158#comment-15638158
]
ASF GitHub Bot commented on SOLR-9688:
--------------------------------------
GitHub user hgadre opened a pull request:
https://github.com/apache/lucene-solr/pull/109
[SOLR-9688] Add a command-line script to manage Solr collection snapshots
Locally tested the script using following commands,
// Start solr and initialize a sample collection
bin/solr start -c
bin/solr create_collection -c books
curl 'http://localhost:8983/solr/books/update?commit=true' -H
'Content-type:application/json' -d '
[
{"id" : "book1",
"title" : "American Gods",
"author" : "Neil Gaiman"
}
]'
//Create and export a snapshot
./snapshotscli.sh --create snap-1 -c books -z localhost:9983
./snapshotscli.sh --list -c books -z localhost:9983
./snapshotscli.sh --describe snap-1 -c books -z localhost:9983
./snapshotscli.sh --export snap-1 -c books -z localhost:9983 -d /tmp
./snapshotscli.sh --delete snap-1 -c books -z localhost:9983
// Restore the backup and verify the doc count
curl
'http://localhost:8983/solr/admin/collections?action=restore&name=snap-1&location=/tmp&collection=books_restored'
curl 'http://localhost:8983/solr/books_restored/select?q=*:*'
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hgadre/lucene-solr SOLR-9688_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/109.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #109
----
----
> Add a command-line tool to manage the snapshots functionality
> -------------------------------------------------------------
>
> Key: SOLR-9688
> URL: https://issues.apache.org/jira/browse/SOLR-9688
> Project: Solr
> Issue Type: Sub-task
> Components: SolrCloud
> Reporter: Hrishikesh Gadre
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]