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
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to