Transfer SOLR ConfigSet to new cluster










0















I am currently running a cloud SOLR6 service in Kubernetes 3 Zookeeper servers and 6 nodes



I recently deployed a new cloud SOLR6 service for dev purposes, but it requires the same schema structures as the current running environment, the data isn't important as I will repopulate that manually



How can i replicate only the structure/schema of the collections running in the current setup










share|improve this question


























    0















    I am currently running a cloud SOLR6 service in Kubernetes 3 Zookeeper servers and 6 nodes



    I recently deployed a new cloud SOLR6 service for dev purposes, but it requires the same schema structures as the current running environment, the data isn't important as I will repopulate that manually



    How can i replicate only the structure/schema of the collections running in the current setup










    share|improve this question
























      0












      0








      0








      I am currently running a cloud SOLR6 service in Kubernetes 3 Zookeeper servers and 6 nodes



      I recently deployed a new cloud SOLR6 service for dev purposes, but it requires the same schema structures as the current running environment, the data isn't important as I will repopulate that manually



      How can i replicate only the structure/schema of the collections running in the current setup










      share|improve this question














      I am currently running a cloud SOLR6 service in Kubernetes 3 Zookeeper servers and 6 nodes



      I recently deployed a new cloud SOLR6 service for dev purposes, but it requires the same schema structures as the current running environment, the data isn't important as I will repopulate that manually



      How can i replicate only the structure/schema of the collections running in the current setup







      apache-zookeeper google-kubernetes-engine solr6






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 7:30









      Illegal OperatorIllegal Operator

      926




      926






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is how ended up doing this, I am sure there is a more efficient way to do it , but this worked.




          1. Log into the source solr pod



            kubectl -it exec sourcePodName -c containerName bash



            eg: kubectl -it exec solr-staging-0 -c solr bash




          2. Create a dump of the configSet



            /opt/solr/bin/solr zk -n configSetName -d /tmp/ configSetName / -z sourceZookeeperAddress : zookeeperPort



            eg: /opt/solr/bin/solr zk -n connectors -d /tmp/connectors/ -z solr-dev.solr-staging-cluster:2181




          3. Retrieve the dump from the kubernetes pod by copying it to your local



            kubectl cp sourcePodName :/tmp/ configSetName /* /tmp/ configSetName



            eg: kubectl cp solr-staging-0:/tmp/connectors/* /tmp/connectors




          4. Create a zip file of the conf content



            zip -r /tmp/ configSetName /con/conf/* /tmp/ configSetName .zip



            eg: zip -r /tmp/connectors/con/conf/* /tmp/connectors.zip




          5. Port forward to your destination kubernetes server



            gcloud container clusters get-credentials clusterName --zone zone --project projectName && kubectl port-forward podName 8983:8983



            eg: gcloud container clusters get-credentials workflows --zone europe-west1-d --project bidvest-alice && kubectl port-forward solr-dev-0 8983:8983




          6. Import your dataset on your destination solr cluster



            NOTE: This is actually the SOLR 7.7 import statement, but the SOLR6.6 command didn't work



            curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/ configSetName .zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name= configSetName "



            eg: cmd: curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/connectors.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=connectors"







          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314389%2ftransfer-solr-configset-to-new-cluster%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is how ended up doing this, I am sure there is a more efficient way to do it , but this worked.




            1. Log into the source solr pod



              kubectl -it exec sourcePodName -c containerName bash



              eg: kubectl -it exec solr-staging-0 -c solr bash




            2. Create a dump of the configSet



              /opt/solr/bin/solr zk -n configSetName -d /tmp/ configSetName / -z sourceZookeeperAddress : zookeeperPort



              eg: /opt/solr/bin/solr zk -n connectors -d /tmp/connectors/ -z solr-dev.solr-staging-cluster:2181




            3. Retrieve the dump from the kubernetes pod by copying it to your local



              kubectl cp sourcePodName :/tmp/ configSetName /* /tmp/ configSetName



              eg: kubectl cp solr-staging-0:/tmp/connectors/* /tmp/connectors




            4. Create a zip file of the conf content



              zip -r /tmp/ configSetName /con/conf/* /tmp/ configSetName .zip



              eg: zip -r /tmp/connectors/con/conf/* /tmp/connectors.zip




            5. Port forward to your destination kubernetes server



              gcloud container clusters get-credentials clusterName --zone zone --project projectName && kubectl port-forward podName 8983:8983



              eg: gcloud container clusters get-credentials workflows --zone europe-west1-d --project bidvest-alice && kubectl port-forward solr-dev-0 8983:8983




            6. Import your dataset on your destination solr cluster



              NOTE: This is actually the SOLR 7.7 import statement, but the SOLR6.6 command didn't work



              curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/ configSetName .zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name= configSetName "



              eg: cmd: curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/connectors.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=connectors"







            share|improve this answer



























              0














              This is how ended up doing this, I am sure there is a more efficient way to do it , but this worked.




              1. Log into the source solr pod



                kubectl -it exec sourcePodName -c containerName bash



                eg: kubectl -it exec solr-staging-0 -c solr bash




              2. Create a dump of the configSet



                /opt/solr/bin/solr zk -n configSetName -d /tmp/ configSetName / -z sourceZookeeperAddress : zookeeperPort



                eg: /opt/solr/bin/solr zk -n connectors -d /tmp/connectors/ -z solr-dev.solr-staging-cluster:2181




              3. Retrieve the dump from the kubernetes pod by copying it to your local



                kubectl cp sourcePodName :/tmp/ configSetName /* /tmp/ configSetName



                eg: kubectl cp solr-staging-0:/tmp/connectors/* /tmp/connectors




              4. Create a zip file of the conf content



                zip -r /tmp/ configSetName /con/conf/* /tmp/ configSetName .zip



                eg: zip -r /tmp/connectors/con/conf/* /tmp/connectors.zip




              5. Port forward to your destination kubernetes server



                gcloud container clusters get-credentials clusterName --zone zone --project projectName && kubectl port-forward podName 8983:8983



                eg: gcloud container clusters get-credentials workflows --zone europe-west1-d --project bidvest-alice && kubectl port-forward solr-dev-0 8983:8983




              6. Import your dataset on your destination solr cluster



                NOTE: This is actually the SOLR 7.7 import statement, but the SOLR6.6 command didn't work



                curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/ configSetName .zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name= configSetName "



                eg: cmd: curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/connectors.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=connectors"







              share|improve this answer

























                0












                0








                0







                This is how ended up doing this, I am sure there is a more efficient way to do it , but this worked.




                1. Log into the source solr pod



                  kubectl -it exec sourcePodName -c containerName bash



                  eg: kubectl -it exec solr-staging-0 -c solr bash




                2. Create a dump of the configSet



                  /opt/solr/bin/solr zk -n configSetName -d /tmp/ configSetName / -z sourceZookeeperAddress : zookeeperPort



                  eg: /opt/solr/bin/solr zk -n connectors -d /tmp/connectors/ -z solr-dev.solr-staging-cluster:2181




                3. Retrieve the dump from the kubernetes pod by copying it to your local



                  kubectl cp sourcePodName :/tmp/ configSetName /* /tmp/ configSetName



                  eg: kubectl cp solr-staging-0:/tmp/connectors/* /tmp/connectors




                4. Create a zip file of the conf content



                  zip -r /tmp/ configSetName /con/conf/* /tmp/ configSetName .zip



                  eg: zip -r /tmp/connectors/con/conf/* /tmp/connectors.zip




                5. Port forward to your destination kubernetes server



                  gcloud container clusters get-credentials clusterName --zone zone --project projectName && kubectl port-forward podName 8983:8983



                  eg: gcloud container clusters get-credentials workflows --zone europe-west1-d --project bidvest-alice && kubectl port-forward solr-dev-0 8983:8983




                6. Import your dataset on your destination solr cluster



                  NOTE: This is actually the SOLR 7.7 import statement, but the SOLR6.6 command didn't work



                  curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/ configSetName .zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name= configSetName "



                  eg: cmd: curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/connectors.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=connectors"







                share|improve this answer













                This is how ended up doing this, I am sure there is a more efficient way to do it , but this worked.




                1. Log into the source solr pod



                  kubectl -it exec sourcePodName -c containerName bash



                  eg: kubectl -it exec solr-staging-0 -c solr bash




                2. Create a dump of the configSet



                  /opt/solr/bin/solr zk -n configSetName -d /tmp/ configSetName / -z sourceZookeeperAddress : zookeeperPort



                  eg: /opt/solr/bin/solr zk -n connectors -d /tmp/connectors/ -z solr-dev.solr-staging-cluster:2181




                3. Retrieve the dump from the kubernetes pod by copying it to your local



                  kubectl cp sourcePodName :/tmp/ configSetName /* /tmp/ configSetName



                  eg: kubectl cp solr-staging-0:/tmp/connectors/* /tmp/connectors




                4. Create a zip file of the conf content



                  zip -r /tmp/ configSetName /con/conf/* /tmp/ configSetName .zip



                  eg: zip -r /tmp/connectors/con/conf/* /tmp/connectors.zip




                5. Port forward to your destination kubernetes server



                  gcloud container clusters get-credentials clusterName --zone zone --project projectName && kubectl port-forward podName 8983:8983



                  eg: gcloud container clusters get-credentials workflows --zone europe-west1-d --project bidvest-alice && kubectl port-forward solr-dev-0 8983:8983




                6. Import your dataset on your destination solr cluster



                  NOTE: This is actually the SOLR 7.7 import statement, but the SOLR6.6 command didn't work



                  curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/ configSetName .zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name= configSetName "



                  eg: cmd: curl -X POST --header "Content-Type:application/octet-stream" --data-binary @/tmp/connectors.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=connectors"








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 '18 at 5:24









                Illegal OperatorIllegal Operator

                926




                926





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314389%2ftransfer-solr-configset-to-new-cluster%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    這個網誌中的熱門文章

                    How to read a connectionString WITH PROVIDER in .NET Core?

                    Node.js Script on GitHub Pages or Amazon S3

                    Museum of Modern and Contemporary Art of Trento and Rovereto